`getOrElseUpdate` does a doublecheck with .containsKey on the underlying
map that allows it to work with null values.

On Sat, Feb 16, 2013 at 12:09 PM, Lars Hupel <notifications@github.com>wrote:

> In core/src/main/scala/scalaz/Memo.scala:
>
> >
> >    /** As with `mutableHashMapMemo`, but forget elements according to
> >      * GC pressure.
> >      */
> > -  def weakHashMapMemo[K, V]: Memo[K, V] = {
> > -    val a = new java.util.WeakHashMap[K, V]
> > +  def weakHashMapMemo[K, V]: Memo[K, V] =
> > +    mutableMapMemo(new collection.mutable.WeakHashMap[K, V])
>
> Alright, I can confirm that.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/scalaz/scalaz/pull/283/files#r3039747>.
>
>