These are chat archives for ramda/ramda

Jul 2016
Jul 17 2016 11:58

I'm getting an error Uncaught TypeError: Illegal invocation when trying to call

var processSlides = R.pipe(
  R.find(x => ==,

I'm calling like processSlides(state.decks). Is there something I am missing?

Oh I figured it out. Thanks all
Jul 17 2016 12:35
I again I'm trying to use a function from the Ramda cookbook. I'm hoping this function will retrieve an object from a list that matches an id
// findById :: String -> Array -> Object
const findById = R.converge(
  [R.pipe(R.nthArg(0), R.propEq("id")), R.nthArg(1)]
I see from the annotation that it takes a string and an array. Is the string supposed to be the id I'm looking for?
Sorry, but point free is still a bit confusing for me.
so when calling I should do findById("1", myList)?
Jul 17 2016 14:07
Ah figured it out again. My id was being passed in as a string, but needed a number. Sorry for rubber ducking the chat room.
Rob Halff
Jul 17 2016 19:44
How to do a nested has? there is not something like hasPath() it seems.
Rob Halff
Jul 17 2016 19:55
I'm gonna be bold and use lodashfp's has for that.
Emilio Srougo
Jul 17 2016 23:53
@rhalff You could use R. pathSatisfies passing a function that checks for undefined