Created
March 15, 2013 22:18
-
-
Save CaglarGonul/5173563 to your computer and use it in GitHub Desktop.
simple production scala
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 product(f:Int=>Int)(a:Int,b:Int):Int={ | |
if(a>b)1 | |
else f(a)*product(f)(a+1,b) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment