Created
September 24, 2012 20:20
-
-
Save tyrcho/3778111 to your computer and use it in GitHub Desktop.
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 pascal(c: Int, r: Int): Int = | |
if (c == 0 || c == r) 1 | |
else if (r == 1) 1 | |
else pascal(c, r - 1) + pascal(c - 1, r - 1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
la ligne 3 ne sert a rien ... elle est déja couverte par la ligne 2 ...