Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let is_prime n =
- let rec checkZero x d = match d with
- | 1 -> true
- | _ -> (x mod d <> 0) && checkZero x (d-1)
- in match n with
- | 0 | 1 -> false
- | _ -> checkZero n (n-1) ;;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement