Talk:Egyptian division: Difference between revisions
m
→Haskell 'lazy lists' example: 2nd point
(Haskell 'lazy lists' example: Returning a remainder, and adding to self, rather than using a multiplication operator ?) |
Thundergnat (talk | contribs) m (→Haskell 'lazy lists' example: 2nd point) |
||
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 ?
:To your second point: something like 580 div 34 perhaps? --[[User:Thundergnat|Thundergnat]] ([[User talk:Thundergnat|talk]]) 22:13, 24 August 2017 (UTC)
|