(defun fixpoint ( x y)
(funcall y (funcall x x y) )
)
(setq fun (fixpoint 'fixpoint
(lambda (s)
(lambda ( f check init result)
(if (funcall check (funcall f init) init )
result
(progn
(print init)
(print result)
(funcall s f check (funcall f init) (+ result init) )
)
)
)
)
)
)
(funcall fun (lambda(x) (+ 1 (/ 1 x) ) )
(lambda (x y)(if (< (abs (- x y)) (/ 1 1000000) ) t nil)) 1 0)
(funcall fun (lambda(x) (+ 1 (/ 1 x) ) )
(lambda (x y)(if (< (abs (- x y)) (/ 1 1000000) ) t nil)) 2 0)
(funcall fun (lambda(x) (+ 1 (/ 1 x) ) )
(lambda (x y)(if (< (abs (- x y)) (/ 1 1000000) ) t nil)) 3 0)
(funcall fun (lambda(x) (+ 1 (/ 1 x) ) )
(lambda (x y)(if (< (abs (- x y)) (/ 1 1000000) ) t nil)) 100 0)
(funcall fun (lambda(x) (+ 1 (/ 1 x) ) )
(lambda (x y)(if (< (abs (- x y)) (/ 1 1000000) ) t nil)) 1000 0)
(funcall fun (lambda(x) (+ 1 (/ 1 x) ) )
(lambda (x y)(if (< (abs (- x y)) (/ 1 1000000) ) t nil)) 10000 0)