Skip to content

Instantly share code, notes, and snippets.

@MichaelBurge
Created September 8, 2017 20:40
Show Gist options
  • Save MichaelBurge/3462043f6252826845d36731cc3d99cd to your computer and use it in GitHub Desktop.
Save MichaelBurge/3462043f6252826845d36731cc3d99cd to your computer and use it in GitHub Desktop.
f x = if even x then x `div` 2 else reduce (3 * x + 1) where reduce x | even x = reduce $ x `div` 2 ; reduce x = x
until (\x -> f x == x) f 19
1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment