Hi all,
I would like to announce a new version 0.4.0 of rmap.
The library internals have changed to a simpler and more memory efficient
model (i.e. the LinkedHashMap is gone). This model also allows adding new
lazy entries to a recursive map and merging them.
In addition to that, this version
Hi Ben,
That's pretty nifty indeed! Maybe a tad memory intensive as it retains the
head, but if it were a more complex, CPU intensive calculation in :next,
that might be very worthwhile. Good stuff.
Cheers,
-Arnout
P.S. The memory consumption will be a little less when I think of a way to
Hi Arnout,
This is interesting, but may be a lot less useful than you think without
filling in all the other methods that a normal map has. For instance, you
cannot do an equality check with another map (no use of
clojure.lang.MapEquivalence or implementation of equals and equiv), nor use
it
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
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)
Thank you for your kind responses! I will look into writing a post that
shows what the motivation was (i.e. how I use it), how it works, and how it
compares to Prismatic's Graph.
Cheers,
Arnout
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To
Wonderful!
It would be interesting to compare this with the syntax choices of
Prismatic's Graph:
https://github.com/Prismatic/plumbing/tree/master/src/plumbing/fnk
.
On Sunday, October 5, 2014 6:08:59 AM UTC+3, Sunil Nandihalli wrote:
On Sun, Oct 5, 2014 at 1:17 AM, Mayank Jain
I would like to announce a very little utility library for defining
recursive maps in Clojure, called rmap.
For example:
(def m
(rmap X
{:what awesome!
:clj (str Clojure is (:what X))})
(:clj m)
;= Clojure is awesome!
An object of type IFn + ILookup + Seqable is currently returned,
This looks amazing!
Could you write a blog post explaining in detail your thought process,
what inspired you, and walking through what you have written?
Thanks! This is beautiful! :D
On Sat, Oct 4, 2014 at 8:57 PM, Arnout Roemers
goo...@company.romeinszoon.nl wrote:
I would like to announce a
On Sun, Oct 5, 2014 at 1:17 AM, Mayank Jain firesof...@gmail.com wrote:
This looks amazing!
Could you write a blog post explaining in detail your thought process,
what inspired you, and walking through what you have written?
+1 for usage patterns that motivated this...
Thanks! This is
10 matches
Mail list logo