Greedy algorithm for Egyptian fractions: Difference between revisions
Content added Content deleted
m (→{{header|Haskell}}: Normalized orthography (egipt -> egypt), specified imports) |
|||
Line 486: | Line 486: | ||
=={{header|Haskell}}== |
=={{header|Haskell}}== |
||
<lang haskell>import Data.Ratio |
<lang haskell>import Data.Ratio (Ratio, (%), denominator, numerator) |
||
egyptianFraction :: Integral a => Ratio a -> [Ratio a] |
egyptianFraction :: Integral a => Ratio a -> [Ratio a] |