These are chat archives for ramda/ramda

Nov 2014
Richard Seldon
Nov 29 2014 12:19 UTC
9500 km later, hello all.
offering up a few ideas:
1). Grunt has a "Built with Grunt" badge if Ramda core wish to add that to other badges. Yeah, that might actually put Gulp folk off but just putting the idea out there.
2). am not convinced "unnest" is the right name for a shallow flatten.
Richard Seldon
Nov 29 2014 12:25 UTC
3). are we happy with Range being exclusive of max, again just asking - no necessarily right answer, just some languages do make that inclusive and personally i think it reads better when inclusive eg. R.range(1, 10) rather than R.range(1,11)
4). Python Itertools has the concept of "Recipes". - recipes for creating an extended toolset using the existing itertools as building blocks.
I think we should include, perhaps as an extension, a Recipes category and include all the usual suspects that can be derived like where, findWhere, compact etc in that extension. If it is optional and all derived, its really just a batteries included extension for those that want it.
would welcome some feedback, for or against from anyone that cares to comment. just interested to hear peoples thoughts.
Michael Hurley
Nov 29 2014 13:21 UTC
1) i don't see any reason to promote the build tool.
2) do you have a better name for shallow flatten?
3) i think @CrossEye took that impl from Python. I'm happy enough with it, but he can defend it if he's so inclined

4) ok with me.

i've been thinking about building a tutorial site in my copious free time. something along the lines of clojure koans or 4clojure.

David Chambers
Nov 29 2014 18:16 UTC
I think the recipes might be better as a wiki page. There are nifty compositions which seem worth sharing but which I don't necessarily want to document and test. One that springs to mind is var list = R.unapply(R.clone);. Now I have a Lisp-like list function: list(1, 2, 3) gives [1, 2, 3]. :)
As for unnest, it's not perfect but it's certainly the best of the names we considered at the time. It's crucial that R.flatten([1, [2, [3]]]) gives [1, 2, 3], otherwise it's not doing its one job correctly!