Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

ITT: ask a scheme guru

Name: this is a secret 2008-02-21 8:02

ask away guys

Name: this is a secret 2008-02-22 8:23

>>3

cons cells are passed by reference, always.




>>8
call/cc ...

THE RESULT OF CALL/CC IS THAT YOU CREATE A "RETURN" FUNCTION:

(define (foo return)
  (return 1)
  (display "fail"))

(call/cc foo) ; the result of call/cc is whatever foo evaluates too, but foo can shortcut the computation and immediatly make (call/cc foo) return a value by calling the function it recieves with the value it wants to return

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List