These are chat archives for ramda/ramda

4th
Apr 2016
Hardy Jones
@joneshf
Apr 04 2016 05:47
That is cool
feels like it can be simplified even more though
R.nth
Hardy Jones
@joneshf
Apr 04 2016 05:48
@ram-bot R.lift(R.nth, [3, 1, 2, 2, 5, 0, 1], ['gesmsa'])
ram-bot
@ram-bot
Apr 04 2016 05:48
[Function]
Hardy Jones
@joneshf
Apr 04 2016 05:48
beh
@ram-bot R.lift(R.nth)([3, 1, 2, 2, 5, 0, 1], ['gesmsa'])
ram-bot
@ram-bot
Apr 04 2016 05:49
[ 'm', 'e', 's', 's', 'a', 'g', 'e' ]
Hardy Jones
@joneshf
Apr 04 2016 05:49
R.join
Hardy Jones
@joneshf
Apr 04 2016 05:49
@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
'message'
Hardy Jones
@joneshf
Apr 04 2016 05:50
:)
David Chambers
@davidchambers
Apr 04 2016 05:51
Very nice, Hardy!
Risto Novik
@riston
Apr 04 2016 10:42
hello, does the R.prop, R.propOr work with class getters ?
Asaf
@asaf-romano
Apr 04 2016 10:44
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
Ty, didnt know that
Asaf
@asaf-romano
Apr 04 2016 10:49
Filed ramda/ramda#1712 for discussion
Drew
@dtipson
Apr 04 2016 11:47
ooo, that's neat @joneshf , never even thought of lift
Drew
@dtipson
Apr 04 2016 11:53
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
do we have memoization in the doc?
I gues memoize would do
Lewis
@6ewis
Apr 04 2016 15:27
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
@dtipson nth works with an Array or a String.
Drew
@dtipson
Apr 04 2016 16:01
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
@dtipson String is array of Char. String is iterable
Drew
@dtipson
Apr 04 2016 16:16
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