This is pretty nifty: user=> (require '[rmap.core :as rmap]) nil user=> (def fibs (rmap/rmap FIBS {:a 0 :b 1 :next (-> FIBS (update-in [:a] (constantly (:b FIBS))) (update-in [:b] (constantly (+ (:b FIBS) (:a FIBS)))))})) #'user/fibs user=> (defn fib [n] (loop [fibs fibs n n] (if (zero? n) (:a fibs) (recur (:next fibs) (dec n))))) #'user/fib user=> (fib 40) 102334155
On Wed, Oct 8, 2014 at 1:37 PM, Arnout Roemers < goo...@company.romeinszoon.nl> wrote: > Hi Zach, > > Thank you for checking out the library. You were right, some interfaces > were missing and some methods had not been implemented. Though this was > documented, they were limitations that could be fixed. > > *So, I'd like to announce version 0.2.0.* > > This version does implement all the necessary interfaces. Your source of > def-map-type from "Potemkin" certainly helped here, although I did not > use it directly. Nice work by the way. I have tested the current rmap > implementation with the "collection-check" library, and it passes. Again, > nice work, Zach. > > I still use a LinkedHashMap as the underlying data structure (as I want > to keep track of the evaluation order), but I could not break that > structure like the way you said. It seems to behave fine. Please let me > know if you do know of a counter example. > > P.S. Zach, the README of the "collection-check" library is not updated > with the dependency change to "test.check". > P.P.S. Still working on a post about the motivation and how it works. > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- Ben Wolfson "Human kind has used its intelligence to vary the flavour of drinks, which may be sweet, aromatic, fermented or spirit-based. ... Family and social life also offer numerous other occasions to consume drinks for pleasure." [Larousse, "Drink" entry] -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.