RosettaCodeData/Task/Fractran/Haskell/fractran-3.hs

4 lines
131 B
Haskell
Raw Permalink Normal View History

2019-09-12 10:33:56 -07:00
readProgram :: String -> [Ratio Int]
2016-12-05 22:15:40 +01:00
readProgram = map (toFrac . splitOn "/") . splitOn ","
where toFrac [n,d] = read n % read d