clojure-cheatsheets icon indicating copy to clipboard operation
clojure-cheatsheets copied to clipboard

Reducers missing

Open ducky427 opened this issue 11 years ago • 5 comments

I noticed that reduced and reduced?, which were added in clojure 1.5, are missing from the cheatsheet.

ducky427 avatar Jul 14 '14 14:07 ducky427

Right you are. In fact, there is nothing in there at all about reducers, added in Clojure 1.5, which includes about a dozen other vars in the clojure.core.reducers namespace.

I personally have not yet understood reducers well enough to suggest a categorization of those functions. I would prefer to add most or all of those below with a reasonable categorization and placement in the cheatsheet, rather than only add 2 of them. If you have a suggestion for how to categorize all of them, please do so.

Namespace clojure.core:

reduced reduced?

Namespace clojure.core.reducers:

append! cat coll-fold drop filter fjtask flatten fold foldcat folder map mapcat monoid pool reduce reducer remove take take-while

jafingerhut avatar Jul 14 '14 14:07 jafingerhut

I actually haven't used clojure.core.reducers. So I won't be able to suggest categorization for them. Let me try to look at them in some detail.

ducky427 avatar Jul 14 '14 14:07 ducky427

Here are some links I have been saving up about them, but haven't gone through it in detail yet:

Official Clojure documentation on reducers, recently edited by Alex Miller. It includes links to 2 blog posts on reducers:

http://clojure.org/reducers

Video of EuroClojure 2012 talk by Rich Hickey on reducers:

http://vimeo.com/45561411

jafingerhut avatar Jul 14 '14 14:07 jafingerhut

cheers!

ducky427 avatar Jul 14 '14 14:07 ducky427

Additional info: Clojure 1.7.0-alpha1 and -alpha2 have added transducers, and at least one statement from Alex Miller on the #clojure IRC channel suggests that while reducers were added to Clojure as an alpha feature, transducers have no such qualification -- Rich Hickey considers them to be a part of Clojure core.

First public announcement that I am aware of on transducers: http://blog.cognitect.com/blog/2014/8/6/transducers-are-coming That said, I haven't taken the time to understand transducers well enough to suggest a categorization of their new functions, either, but I would wait until Clojure 1.7 is released before considering that seriously.

jafingerhut avatar Sep 06 '14 20:09 jafingerhut