by
82k 39

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;"
src="https://www.snip2code.com/Embed/684/Scala-recursive-function-computing-the-p?startLine=0"></iframe>
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