Command: ('((x) (1+ x)) 2)
3
A quote does just fine!
Wow! Didn't know that one! So you don't actually need a lambda:Code: [Select]Command: ('((x) (1+ x)) 2)
A quote does just fine!
3
< ..>Code - Auto/Visual Lisp: [Select]In current AL that won't only not give the correct result, but would have no efficiency gain (since both the forms are evaluated prior to passing it to _or).
Huh? In lisp everything /= nil is evaluated as "not-false". There is no such thing as "true", there's only "not-false" ... or rather "not-nothing". The T symbol is only added as a constant for special cases: http://www.lispworks.com/documentation/HyperSpec/Body/v_t.htm Effectively it's not needed.
It would drive me crazy if AND and OR did not return a boolean value. ...
Good one! That's probably how it would be implemented inside CL!Code - Auto/Visual Lisp: [Select]
I've been playing with Lisp since before you were in nappies, I don't need language lessons, but thanks.Then I'm a bit confused as to why you're questioning this. So you were playing with lisp since the 70's? I tip my hat, I was only starting with it in the early 90's. Hope I didn't offend - it just appeared that you were under a misconception about how lisp handled "booleans". It wouldn't be the first time I've misread someone's intention in a post :ugly:
Why Common Lisp? CL and AL are so different. Scheme would be a slightly better reference.Even in scheme the or & and work this way. See page 26 here: http://groups.csail.mit.edu/mac/ftpdir/mit-scheme/7.7/7.7.1/doc-pdf/scheme.pdf
...could you point me in some direction as to why SCM is a closer match to AL?