Commits

w01fe committed ae54420

force becomes deref, to allow futures in place of delays

  • Participants
  • Parent commits 71073db

Comments (0)

Files changed (1)

src/main/clojure/lazymap/core.clj

   IMapEntry
   (key           [_] k)
   (getKey        [_] k)
-  (val           [_] (force v))
-  (getValue      [_] (force v))
+  (val           [_] (deref v))
+  (getValue      [_] (deref v))
   Object
-  (toString      [_] (str \[ (pr-str k) \space (pr-str (force v)) \])))
+  (toString      [_] (str \[ (pr-str k) \space (pr-str (deref v)) \])))
 
 (defmethod print-method LazyMapEntry
   [this #^java.io.Writer w]
   (valAt
     [this k not-found]
     (if (contains? base k)
-      (-> base (get k) force)
+      (-> base (get k) deref)
       not-found))
   IFn
   (invoke [this k]           (.valAt this k nil))