These are chat archives for ramda/ramda

4th
Apr 2016
Hardy Jones
@joneshf
Apr 04 2016 05:47 UTC
That is cool
feels like it can be simplified even more though
R.nth
Hardy Jones
@joneshf
Apr 04 2016 05:48 UTC
@ram-bot R.lift(R.nth, [3, 1, 2, 2, 5, 0, 1], ['gesmsa'])
ram-bot
@ram-bot
Apr 04 2016 05:48 UTC
[Function]
Hardy Jones
@joneshf
Apr 04 2016 05:48 UTC
beh
@ram-bot R.lift(R.nth)([3, 1, 2, 2, 5, 0, 1], ['gesmsa'])
ram-bot
@ram-bot
Apr 04 2016 05:49 UTC
[ 'm', 'e', 's', 's', 'a', 'g', 'e' ]
Hardy Jones
@joneshf
Apr 04 2016 05:49 UTC
R.join
Hardy Jones
@joneshf
Apr 04 2016 05:49 UTC
@ram-bot R.join('', R.lift(R.nth)([3, 1, 2, 2, 5, 0, 1], ['gesmsa']))
ram-bot
@ram-bot
Apr 04 2016 05:49 UTC
'message'
Hardy Jones
@joneshf
Apr 04 2016 05:50 UTC
:)
David Chambers
@davidchambers
Apr 04 2016 05:51 UTC
Very nice, Hardy!
Risto Novik
@riston
Apr 04 2016 10:42 UTC
hello, does the R.prop, R.propOr work with class getters ?
Asaf
@asaf-romano
Apr 04 2016 10:44 UTC
prop does, propOr doesn't
though I'd think propOr should work with hasIn rather than has
the documentation does mention "own properties" explicitly though.
which is (almost) never true for class-getters
pathOr probably does work with class-getters though (sort of implementation detail)
Risto Novik
@riston
Apr 04 2016 10:47 UTC
Ty, didnt know that
Asaf
@asaf-romano
Apr 04 2016 10:49 UTC
Filed ramda/ramda#1712 for discussion
Drew
@dtipson
Apr 04 2016 11:47 UTC
ooo, that's neat @joneshf , never even thought of lift
Drew
@dtipson
Apr 04 2016 11:53 UTC
though if the second argument is an array, wouldn't it still need to be lift(nth)([3, 1, 2, 2, 5, 0, 1], [['g','e','s','m','s','a']])
Lewis
@6ewis
Apr 04 2016 14:51 UTC
do we have memoization in the doc?
I gues memoize would do
Lewis
@6ewis
Apr 04 2016 15:27 UTC
I don't know if it's a good idea to set R methods available by default in the repl...I spent some time debugging why the variable test was already defined (or rather the appropriate error message should be returned)
I actually downloaded the repl repo to debug and later find out that I don't need R.test(), I could do test()
test is a relatively very frequent variable name I would assume
Hardy Jones
@joneshf
Apr 04 2016 15:57 UTC
@dtipson nth works with an Array or a String.
Drew
@dtipson
Apr 04 2016 16:01 UTC
right, but for this, it'd have to be of([]). That's what I was hoping to abstract out of the final signature
R.lift(R.nth)([3, 1, 2, 2, 5, 0, 1], [['g','e','s','m','s','a']])
Denis Stoyanov
@xgrommx
Apr 04 2016 16:09 UTC
@dtipson String is array of Char. String is iterable
Drew
@dtipson
Apr 04 2016 16:16 UTC
right, but the signature needs an Array of String or an Array of Array rather than a string or Array. Not a big deal (toss an Array.of/of into the composition), but I was trying to to avoid that