After learning a bit of Scheme from SICP, I started reading The Little Schemer (which I find quite entertaining) and am about one fourth done. I noticed that I can write many (most? all?) solutions without using lambda whereas The Little Schemer always uses them. For example, the very first definition is
(define atom?
(lambda (x)
(and (not (pair? x)) (not (null? x)))))
which, unless I am mistaken, can be written more simply as
(define (atom? x)
(and (not (pair? x)) (not (null? x))))
Am I missing something fundamental if I write lambda-less solutions?
Originally,
define
had a single syntax, to set a variable to a value. That's the style used in such old (and timeless) books. Later on,define
got a different syntax as a shortcut, which is the one you're using.Just for fun, search on your Scheme libraries, you might find a macro that expands the non-lambda form into the old lambda-heavy one.