These are chat archives for ramda/ramda

25th
Dec 2017
Johnny Hauser
@m59peacemaker
Dec 25 2017 04:17
@josepot I think it has something to do with `apply`
I can't remember. I did something like that once. It's pretty odd and not worth it to be point free, iirc.
Josep M Sobrepere
@josepot
Dec 25 2017 07:33
Thanks @m59peacemaker !
And Merry Christmas BTW!
Johnny Hauser
@m59peacemaker
Dec 25 2017 13:26
Merry Christmas! :D
Johnny Hauser
@m59peacemaker
Dec 25 2017 14:56
@josepot Hey, why the `nthArg` there?
vs
`const actionProp = (x, y) => compose(prop(x), y)`
oh wait, nm
haha, fp reks brains sometimes :)
Johnny Hauser
@m59peacemaker
Dec 25 2017 15:08
@josepot Is this it?
``````const actionProp = pipe(
prop,
of,
append(nthArg(1)),
apply(compose)
)``````
Johnny Hauser
@m59peacemaker
Dec 25 2017 15:45
@kwijibo lol... I am not nearly competent enough with those algebraic data types for that
My library doesn't support fantasy land like flyd does. That would be cool, but I don't get all that stuff, and I'd rather do static land if I did.
I guess I'll end up having a jankety function to get the result I need for now until I have time to level up my fp game.
Josep M Sobrepere
@josepot
Dec 25 2017 17:42
@m59peacemaker You got it! Yep, that's it! Pretty cool! Thanks a lot!
Josep M Sobrepere
@josepot
Dec 25 2017 18:07

``const actionProp = converge(compose, [prop, always(nthArg(1))])``

I would really appreciate an explanation of why that ^^ doesn't work.

Josep M Sobrepere
@josepot
Dec 25 2017 18:37
Oh, I got it! Hey @m59peacemaker , this is an alternative:
``````const actionProp = converge(compose, [
nAry(1, prop),
always(nthArg(1)),
])``````
I think that I like yours better, but in any case I agree with your original statement: "It's pretty odd and not worth it to be point free"
Johnny Hauser
@m59peacemaker
Dec 25 2017 22:29
LOL, I did that first thing you did, and then I tried to do the second thing you did and couldn't figure out what function to use where you did `nAry`
I like that one best, actually
but still, very hard to reason about