Created
May 4, 2012 03:28
-
-
Save adambard/2591773 to your computer and use it in GitHub Desktop.
Recursive anonymous factorial in MATLAB, using functools.
This file contains 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
fact = functools.Y(@(self) @(n) ... | |
functools.if(n < 2,... | |
@() 1, | |
@() n * self(n - 1)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment