home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 7
/
Apprentice-Release7.iso
/
Source Code
/
C
/
Applications
/
Moscow ML 1.42
/
examples
/
lexyacc
/
cl
/
append.cl
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
|
1997-08-18
|
321 b
|
14 lines
|
[
TEXT/R*ch
]
(* File "cl/append.cl" --
do indirection chains in the second argument build up?
No. *)
letrec
from = \n. pack{2, n, from (n+1)};
append = \xs.\ys. case xs of
<1> -> ys;
<2> x xr -> pack{2, x, append xr ys}
end
in append (from 1) (from 1)