recursion

Keith Wansbrough Keith.Wansbrough@cl.cam.ac.uk
Thu, 21 Aug 2003 12:32:54 +0100


> <html><div style='background-color:'><DIV>
> <P>hi guys,</P>
> <P>may i know how to use recursive in a function. for example i have a function lets call it old which accept [[Bool]]-&gt;[(Int),(Int)]-&gt;(Int,Int) and return [(Int),(Int)]</P>
> <P>and now i have another function lets say its called new, which calls the previous function&nbsp;and new will recursively check the value which the previous function returned. and it will return [(Int,Int)]</P>
> <P>thank you very much for ur concern</P>

Just do it... there's nothing special involved, unlike some other functional languages.  All definitions are recursive by default, so just "calling yourself" is sufficient.

BTW: please post in plain ASCII, not HTML - this should be an option in Hotmail somewhere.  It makes it easier for people to read your messages and reply to them.

HTH..

--KW 8-)
-- 
Keith Wansbrough <kw217@cl.cam.ac.uk>
http://www.cl.cam.ac.uk/users/kw217/
University of Cambridge Computer Laboratory.