Created
April 22, 2015 18:16
-
-
Save rbobillot/f79345197e67b3ea3dd4 to your computer and use it in GitHub Desktop.
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
implicit def facto( x:Int ) = new { | |
def ! = (1 to x).foldLeft( BigInt(1) )( _ * _ ) | |
} | |
println( 8! ) //equivaut a un simple appel de methode -> println( 8.! ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment