Jump to content

Greedy algorithm for Egyptian fractions: Difference between revisions

→‎Composition of pure functions: Edited derivation of negative ratios
(→‎{{header|Python}}: Added a functionally composed version.)
(→‎Composition of pure functions: Edited derivation of negative ratios)
Line 1,596:
)) if n else Nothing()
fr = Fraction
xsreturn = unfoldr(go)list(nd)
return list( map(neg, xsunfoldr(go)(-nd)) if 0 > nd else xs
) if 0 > nd else unfoldr(go)(nd)
 
 
9,655

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.