These are chat archives for ramda/ramda

Jan 2019
Just RAG
Jan 23 10:42 UTC
@ben-eb OK, definitely need to check this lenses thing...
Jan 23 20:20 UTC
Anyone here experience a case where R.when evaluates to to false but the trueFn is being invoked ?
I'm seeing that and stepping through in the debugger shows it happening, unless there is some type of evaluation of the trueFn that happens all the time
Brad Compton (he/him)
Jan 23 20:24 UTC
Can you post a minimal reproduction? The source code is pretty straightforward, I don't think that should be happening?
Jan 23 20:32 UTC
alright going to try a few things first in the repl tool
Jan 23 20:41 UTC
@Bradcomp nevermind, I was using hasPath as the test condition, I moved it outside and used it within an if instead of using R.when and it works as expected, for whatever reason the debugger was showing the break inside the trueFn. It is something like this
    const doSomething =  R.when(
            mapAccumIndexed(mapper, {}),
Brad Compton (he/him)
Jan 23 20:42 UTC
I'm glad you got it sorted!