These are chat archives for ramda/ramda

May 2017
Mika Kalathil
May 30 2017 00:32
is there a better way of doing const addToSomeProp = curry((data, item) => merge(data, {someProp: concat(data.someProp, item)})
rather a point free way?
Brad Compton (he/him)
May 30 2017 00:50
You could use mergeWith(concat) for most cases
Mika Kalathil
May 30 2017 03:17
oh interesting, so then I could just do useWith(mergeConcat, [identity, objOf('someProp')])
good idea
Mika Kalathil
May 30 2017 03:26
Hmm that works and all but i think maybe i need helper fn to do (path, fn, data, option) => assocPath(path, fn(option), data)
Jason Shin
May 30 2017 13:13
hi guys
Last time @i-am-tom showed me how to run multiple Future / Task in compose and combine results in a list or an array and pass it to other function. So like
  map(doThings), // with [fetch1Result, fetch2Result]
But I lost his post unfortunately =(
can someone guide me about it again?
Denis Stoyanov
May 30 2017 13:16
Jason Shin
May 30 2017 13:16
do you mean chain(fetch1, fetch2)
Denis Stoyanov
May 30 2017 13:18
composeK(f1, f2,f3...)
Jason Shin
May 30 2017 13:24
i guess i can
create a list or object inside fetch2
which is not ideal i guess but it works for now
Gabe Johnson
May 30 2017 14:34
@JasonShin, @xgrommx was correct. You have to use composeK (or composeP with Promise returning functions)
composeK : compose :: chain : map
Denis Stoyanov
May 30 2017 14:58
functional arrow (a -> b) ~> composition (.)
Kleisli arrow (Monad m => a -> m b) ~> Kleisli composition (composeK, <=< (fish operator))
Per Harald Borgen
May 30 2017 18:59
Hey all! A friend of mine created a Ramda tutorial using our interactive screencasting tool. I wanted to share it with you case it can help people get started with Ramda: