82k 37

Scala recursive function computing the products of all letters in a string

Recursive scala function that compute the product of the Unicode codes of all letters in a string.
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
def mUni( word: String ) : BigInt = { if ( word.length <= 1 ) word(0) else word(0) * mUni( word.drop(1) ) }
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus