callback

(callback time proc|symbol . args)


Description:

Callback to proc (or the proc bound to symbol) at time.


Arguments:

    proc|symbol -- the procedure to callback into or the symbol of the procedure to callback into

           args -- any arguments required by proc

           time -- to to callback to proc


Returns: boolean


Examples:

; a one off callback

(callback (+ (now) (* *minute* 10)) (lambda (str) (print str)) "Hello World")


; a termporally recursive function

(define loop

(lambda (time str)

(print "Hello World")

(callback (+ time 10000) 'loop (+ time 11025) str)))



Back to index