Greedy algorithm for Egyptian fractions: Difference between revisions

(→‎Composition of pure functions: Edited derivation of negative ratios)
Line 1,596:
)) if n else Nothing()
fr = Fraction
returnf list= unfoldr(go)
return list(map(neg, unfoldr(go)f(-nd))) if 0 > nd else f(nd)
) if 0 > nd else unfoldr(go)(nd)
 
 
9,655

edits