These are chat archives for ramda/ramda

6th
Mar 2019
Mike Chen
@mike442144
Mar 06 04:25
@ben-eb I see, thanks
Denis Stoyanov
@xgrommx
Mar 06 09:33
ZipIterable
Johnny Lau
@jlauu
Mar 06 17:32

I'm struggling to turn this into a pointfree style:

selectOnlyIfInRangeOf = someMap =>  
  filter(
    pipe(path(['a','b']), prop, applyTo(someMap)),
    CONSTANT_LIST)

I'm inclined to write this with some way to "insert" a parameter into pipe

selectOnlyIfInRangeOf = pipe(  
    applyTo, 
    pipe(path(['a','b']), prop, __),
    filter,
    applyTo(CONSTANT_LIST)
)

Does anyone know a good pattern for parameterizing my transformation function at an arbitrary point in its "pipeline"

Brad Compton (he/him)
@Bradcomp
Mar 06 17:57
While I don't recommend turning everything point free, converge or useWith will typically do the trick
Johnny Lau
@jlauu
Mar 06 20:46
@Bradcomp thanks, brad! This is exactly the multitool functions I needed