RosettaCodeData/Task/Fractran/Haskell/fractran-3.hs
2023-07-01 13:44:08 -04:00

3 lines
131 B
Haskell

readProgram :: String -> [Ratio Int]
readProgram = map (toFrac . splitOn "/") . splitOn ","
where toFrac [n,d] = read n % read d