Talk:Egyptian division: Difference between revisions
m
Reverted edits by Thundergnat (talk) to last revision by Hout
Thundergnat (talk | contribs) m (→Haskell 'lazy lists' example: 2nd point) |
Thundergnat (talk | contribs) m (Reverted edits by Thundergnat (talk) to last revision by Hout) |
||
Line 54:
First, to avoid using (*) (in this exercise in deriving division from addition and subtraction), the function which you '''iterate''' for 'doubling' could either be <code Haskell>(+) >>= id</code> or the equivalent <code Haskell>join (+)</code> (where join is imported from Control.Monad).
Second, perhaps the task really needs a formulation which returns a remainder as well as a quotient ?
|