[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Scheme Digest #105



oops, made a mistake with my interpretation of the program yesterday,

I thought that

(define (foo bool)
   (if bool
       (define (result) #t)
       (define (result) #f))
   (result))

meant define the procedure result as the value #t/#f. My mistake was in
thinking #t/#f were values which couldn't evaluate (procedural thinking), in
fact (define (result) #t) is merely syntactic sugar for

(define result (lambda() #t))

Which, as most of you know only too well,is the lambda func which
evaluates '#t', which of course returns #t.

stupid mistake, too many years of pascal warps your way of thinking :-)



+-----------------------------------------------------------------------------+
|Ian Murphy (^v^)               | Internet   : IAN@VAX1.UCC.IE                |
|Dept. Computer Science         | ARPA       : IAN@IRUCCVAX.BITNET            |
|University College Cork,       | janet      : EARN%IRL.HEA.UCC.IRUCCVAX::IAN |
|Ireland.                       | Voice      : "IAN!!!"                       |
+-----------------------------------------------------------------------------+