juan_gandhi: (Default)
I believe it's nothing, such a small thing. But it was a good idea to document it using .md

Anybody cares to read? 

https://github.com/vpatryshev/ScalaKittens
juan_gandhi: (Default)
def cached[K,V](f: K => V) : K => V = {
       val cache = new scala.collection.mutable.HashMap[K,V]
       k => cache.getOrElseUpdate(k, f(k))
     }

Profile

juan_gandhi: (Default)
Juan-Carlos Gandhi

November 2025

S M T W T F S
       1
23456 7 8
9 1011 12 1314 15
16171819 20 2122
23 24 252627 2829
30      

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Nov. 28th, 2025 10:31 pm
Powered by Dreamwidth Studios