HomeAboutCodePastes

Paste on 2021-04-02T13:03:12

let is_prime n known_primes =
  if List.exists (fun x -> n mod x == 0) kprimes then true
  else false
;;

is_prime 10 [2,3,5,7]

plain