home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
lisp
/
elk-2_0.lha
/
elk-2.0
/
examples
/
scheme
/
kons
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1991-09-25
|
224 b
|
14 lines
;;; -*-Scheme-*-
(define (kons left right)
(lambda (op)
(case op
(a left)
(d right))))
(define (kar cell) (cell 'a))
(define (kdr cell) (cell 'd))
(let ((k (kons 1 2)))
(print (cons (kar k) (kdr k))))