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

September 2025

S M T W T F S
 1 23456
78910111213
14151617181920
21222324252627
282930    

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Sep. 6th, 2025 03:35 pm
Powered by Dreamwidth Studios