Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!wuarchive!usc!snorkelwacker!bloom-beacon!dad.mentor.COM!plogan From: plogan@dad.mentor.COM (Patrick Logan) Newsgroups: comp.lang.scheme Subject: (none) Message-ID: <9008241654.AA11326@dad.MENTOR.COM> Date: 24 Aug 90 16:54:04 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 18 Colin Plumb writes: Less obviously, (define (bar x) (cons x 1)) is not a function, since ... [confusing use of call/cc and bar] It is a function. Every element in the domain is mapped to a unique element in the codomain. The disturbing behavior Colin observed happens as a result of playing with continuations. It has nothing to do with the function defined above. Scheme->C -- 23feb90jfb -- Copyright 1989 Digital Equipment Corporation > (define (bar x) (cons x 1)) BAR > (let ((y (call-with-current-continuation bar))) (if (= (cdr y) 1) ((car y) (cons (car y) 2)) (cdr y))) 2