Guest User

Untitled

a guest
Jan 23rd, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. -- this implementation is pretty slow and brute-forcey
  2. let gcd a b | a > b = gcd b a | b == 0 = a | otherwise = gcd (a-b) b
  3. let lcm a b = div (a*b) (gcd a b)
  4. let fn x n | n < 20 = fn (lcm x (n+1)) | otherwise = x
  5. fn 1 2
Add Comment
Please, Sign In to add comment