Ad
Fundamentals
Functional Programming
Code
Diff
  • module NumberPrint where
    
    numberprint :: Int -> Integer
    numberprint n = read $ concatMap show ([1 .. pred n] <> [n, pred n .. 1])
    • module NumberPrint where
    • numberprint :: Int -> Integer
    • numberprint n = read . concat $ show <$> [1 .. pred n] <> [n, pred n .. 1]
    • numberprint n = read $ concatMap show ([1 .. pred n] <> [n, pred n .. 1])