car cdr cons from little LISPer
(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)))
DZone Snippets > frontera000 > car
12134 users tagging and storing useful source code snippets
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
(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)))