Skip to content

Instantly share code, notes, and snippets.

@bmarcot
Created April 29, 2013 09:52
Show Gist options
  • Save bmarcot/5480697 to your computer and use it in GitHub Desktop.
Save bmarcot/5480697 to your computer and use it in GitHub Desktop.
def isPrime(n: Int): Boolean = (2 to n - 1).forall(x => n % x != 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment