On Wed, 17 Jun 2009 10:51:48 -0700 (PDT), Wrexsoul <d2387...@bsnow.net> wrote: > On Jun 17, 3:20 am, kkw <kevin.k....@gmail.com> wrote: >> I only knew about map, apply, and reduce from studying haskell in uni. >> I've not heard of 'reduce' referred to as 'accum', but then again when >> I wanted to determine the number of elements in a seq, I kept >> searching for 'length' and 'size' but didn't think of 'count', so it >> can be a bit tricky eh? > > Guess-the-synonym -- fun for the entire family! But I looked not only > for "accumulate" or similarly but when I didn't see it, for every > single function whose documentation mentioned "seq", figuring that > should cover everything taking a sequence as input.
For reference, Wikipedia offers "accumulate", "compress", "inject", and "foldr"/"fold-right" as common synonyms for reduce. Similarly "collect" and "transform" for map. Perhaps these words should appear in the docstrings just for searching purposes? > >> I've certainly asked my fair share of noob- >> questions, and folks in this group have been quite happy to oblige me. > > Yes; it seems the derision comes when you don't find something and > then instead of asking after it here you actually implement it > yourself. :) This is rather odd -- normally, self-help should be > rewarded in preference to always bugging the forum for assistance, not > punished. Sharing your efforts that might benefit others, likewise. > As a friendly suggestion, I'd like to offer that perhaps the derision is caused not by the fact that you had the initiative to implement it yourself, but rather by such phrasing as: > I'm shocked that [reduce/accum/foldr] is missing from clojure.core. > [...] This is one of the most basic, useful functions in functional > programming. This seems to assert *as fact* that it is missing, fails to acknowledge the possibility that (either by accident or by documentation that could be more comprehensive) you simply overlooked it, and perhaps worst of all, suggests incompetence on the developers' part for excluding it. There are many extremely smart people, far smarter than I am, working on Clojure and participating in this mailing list. When in doubt, I invoke maximum humility, because I am usually wrong :) -Kyle --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---