Guest User

Untitled

a guest
Feb 22nd, 2013
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
F# 0.15 KB | None | 0 0
  1. let rec findLargestPrimeFactor p = function
  2.   | 1L -> p
  3.   | n when n % p = 0L -> findLargestPrimeFactor p (n/p)
  4.   | n -> findLargestPrimeFactor (p + 2L) n
Advertisement
Add Comment
Please, Sign In to add comment