<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16587" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face="Courier New" size=2>For who likes it.</FONT></DIV>
<DIV><FONT face="Courier New" size=2>A probably useless but funny
applicative-order Y-combinator for arbitrary numbers of mutual dependent
procedures of arbitrary arities:</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>(lambda ms<BR> (apply values<BR>
((lambda (c)<BR> ((lambda (e) (map e
ms))<BR> (lambda (m) (apply (c m) (map c
ms)))))<BR> (lambda (m)<BR> (lambda
fs<BR> (apply m<BR>
(map<BR> (lambda
(f)<BR> (lambda xs (apply (apply f fs)
xs)))<BR> fs)))))))</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT><FONT face="Courier New" size=2>
<DIV><FONT size=+0><FONT face="Courier New" size=2>It took me some labour to
concoct this thing.</FONT></FONT></DIV>
<DIV><FONT size=+0><FONT face="Courier New" size=2>A useless
e</FONT></FONT>xample:</FONT></FONT></DIV></DIV>
<DIV><FONT><FONT face="Courier New" size=2></FONT></FONT> </DIV>
<DIV><FONT><FONT face="Courier New" size=2>(let-values<BR> (((triple?
triple+1? triple+2?)<BR> (y ; insert the above
procedure<BR> (lambda (triple? triple+1?
triple+2?)<BR> (lambda
(x)<BR> (or (zero? x) (triple+2? (sub1 x)
'ignored)))) ; multiple of 3 + 0<BR> (lambda (triple?
triple+1? triple+2?)<BR> (lambda
(x)<BR> (and (not (zero? x)) (triple? (sub1 x)))))
; multiple of 3 + 1<BR> (lambda (triple? triple+1?
triple+2?)<BR> (lambda (x
ignored)<BR> (and (not (zero? x)) (triple+1? (sub1
x))))))))<BR> (triple? 100002)) ;--> #t</FONT></DIV>
<DIV><FONT size=2><BR><FONT face="Courier New"></FONT></FONT></DIV></FONT>
<DIV><FONT face="Courier New" size=2>Jos koot</FONT></DIV></BODY></HTML>