Skip to content

Instantly share code, notes, and snippets.

@Bonifacio2
Last active September 8, 2016 20:21
Show Gist options
  • Save Bonifacio2/55d9e786cfe3c4f3e8a1f3852f5f6f4a to your computer and use it in GitHub Desktop.
Save Bonifacio2/55d9e786cfe3c4f3e8a1f3852f5f6f4a to your computer and use it in GitHub Desktop.
cutn :: Int -> [Int]
cutn n
| (n `div` 10) == 0 = [n]
| otherwise = (cutn (n `div` 10)) ++ [n `mod` 10]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment