Example Lambda callcc 001
|
(call_cc
(lambda (aContinuation)
pvars:(callback)
(setq callback aContinuation)
;; Note: If I do not use a call back here, mapc will not quit at 1020.
;; When I find 1020, I need to break out of mapc. I do so by
;; invoking the current continuation created by the call_cc
(mapc
(lambda(x) (if (> x 1000) then (callback x)))
#(54 0 37 1020 245 19))
true)
)
;;return the result of adding
Returns:
Here are examples of the callcc function at work.
Lambda callcc 001 |
Here is the link to the current function used in this example.
Here are a number of links to other related functions.
eval(#void) |
Here are the links to the data types of the arguments used in this example. Here are a number of links to examples having similar argument types.
Lambda
Analytic Information Server (AIS)AIS Component Systems
|