Skip to content

Instantly share code, notes, and snippets.

@tyrcho
Created September 24, 2012 20:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tyrcho/3778111 to your computer and use it in GitHub Desktop.
Save tyrcho/3778111 to your computer and use it in GitHub Desktop.
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)
@jeantil
Copy link

jeantil commented Sep 24, 2012

la ligne 3 ne sert a rien ... elle est déja couverte par la ligne 2 ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment