Faulhaber's formula: Difference between revisions

m
(→‎Haskell: Replaced Control.Arrow with bimap and an applicative. Tidied.)
Line 953:
[0 ..]
polynomials :: [[(String, String)]]
polynomials = fmap ((ratioPower =<<) . reverse . flip zip [1 ..]) faulhaber
 
---------------------------- TEST --------------------------
main :: IO ()
Line 974 ⟶ 978:
cols)
polynomials :: [[(String, String)]]
polynomials = fmap ((ratioPower =<<) . reverse . flip zip [1 ..]) faulhaber
-- Value pair -> String pair (lifted into list for use with >>=)
ratioPower :: (Rational, Integer) -> [(String, String)]
9,655

edits