On Fri, Jul 26, 2013 at 9:27 PM, Yoshinori Kohyama <yykohy...@gmail.com>wrote:

> Thank you, Ben.
>
> If I think the map as a tree, then as a functor, what I do is 'fmap' (in
> Haskell or some languages),
> ,as you say.
> Thanks for saying that.
>
> Does Algo supply things around Functor, Applicative and Monad?
> I'm going to look at Algo.
>
> Or anybody knows any other libraries or implementations around these
> things in Clojure?
>
>
algo.generic has a functor implementation for regular maps which you could
already use, if your maps have uniform depth:

(fmap (partial fmap inc) {:a {:x 1} :b {:y 2}}) ---> {:a {:x 2} :b {:y 3}}

if you want to use that fmap (or, I'd think, the fmaps provided by either
morph or fluokitten) with uneven depths, you'd have to wrap them in a
defrecord or deftype, I'd expect.

-- 
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/groups/opt_out.


Reply via email to