Skip to content

Instantly share code, notes, and snippets.

@davidcorbin
Created August 5, 2014 20:00
Show Gist options
  • Save davidcorbin/8438b681a60bd61e916d to your computer and use it in GitHub Desktop.
Save davidcorbin/8438b681a60bd61e916d to your computer and use it in GitHub Desktop.
sqrt
integerSquareRoot :: Integral a => a -> a
integerSquareRoot n
| n < 0 = error "integerSquareRoot: negative argument"
| otherwise = integerSquareRoot' n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment