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
2345678
9101112131415
16171819202122
23242526272829
30      

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

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