Created
January 23, 2016 18:59
-
-
Save niorad/45187d9eb76c585e573e to your computer and use it in GitHub Desktop.
Haskell Go-Function Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
divideBy x y = go x y 0 | |
where go a b count | |
| a < b = (count, a) | |
| otherwise = go (a - b) b (count + 1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment