Talk:Fixed-point combinator: Difference between revisions

Content deleted Content added
Jbolden1517 (talk | contribs)
Jbolden1517 (talk | contribs)
I don't get it: remove excess
Line 49:
 
: f is a little too simple, it doesn't have an iterative structure. Let
plus x 1 = suc(x)
plus x 0 = x
plus x y = plus (suc x) (dec y)
: where suc(x) is essentially x+1 and dec y is essentially y -1. Your f is just f = (flip plus 1).
: OK now the problem is plus is defined recursively. So lets make it a function of 3 variables:
plus' g x 1 = suc(x)
plus' g x 0 = x
plus' g x y = g (suc x) (dec y)