DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Car Cdr Cons From Little LISPer

  • submit to reddit
        // description of your code here

(define cons
 (lambda (u v)
   (lambda (b)
     (cond (b u)
     (#t v)))))
(define lunch (cons 'apple '()))
(define car (lambda (l) (l #t)))
(define cdr (lambda (l) (l #f)))



Snippets Manager replied on Tue, 2009/03/03 - 9:24am

Test can be made in a car rental in israel agency (Such as "Eldan" ?) Code is "Lambda calculus" which should compiled in lots of ways I guess.