Fractran: Difference between revisions
→JS Functional: Pruned out a few unused functions
(→{{header|JavaScript}}: Added a functionally composed version, attempting primes, but lacking bigInt) |
(→JS Functional: Pruned out a few unused functions) |
||
Line 2,052:
const bindMay = (mb, mf) =>
mb.Nothing ? mb : mf(mb.Just);
// concatMap :: (a -> [b]) -> [a] -> [b]
const concatMap = (f, xs) =>
Line 2,081 ⟶ 2,078:
return Nothing();
};
// findIndices :: (a -> Bool) -> [a] -> [Int]
Line 2,134 ⟶ 2,128:
}
}
▲ const
// properFracRatio :: Ratio -> (Int, Ratio)
|