Created
May 14, 2013 07:16
-
-
Save mjhea0/5574241 to your computer and use it in GitHub Desktop.
BASIC ruby recursion
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
| def recurse(count=0) | |
| return if count == 10 | |
| puts count | |
| count += 1 | |
| recurse(count) | |
| end | |
| recurse |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment