guile-user
[Top][All Lists]
Advanced

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

Re: C++ declaration style programming?


From: Viktor Pavlenko
Subject: Re: C++ declaration style programming?
Date: Wed, 21 Jan 2004 23:28:11 -0500

>>>>> "TTN" == Thien-Thi Nguyen <address@hidden> writes:

    TTN> (defmacro let-false (bindings . body)
    TTN>   `(let ,(map (lambda (b) (list b #f)) bindings) ,@body))

    TTN> (let-false (a b c)
    TTN>   (set! a 2)
    TTN>   (set! b (+ a (* a a)))
    TTN>   (set! a (+ b (* b b)))
    TTN>   (list a (not c))) => the answer to life the universe and everything?

If we're in a contest of getting the answer to all questions from 2,
count me in:

(let ((x 2))
  (string->number
   ((lambda (x) (string-append x x x)) (number->string x x)) x))

cheers

-- 
Viktor




reply via email to

[Prev in Thread] Current Thread [Next in Thread]