// process1 :: (Item -> Bool) -> [Item] -> [OtherType] // process2 :: [Item] -> [OtherType] process1(isOk, items); //=> [otherType1, otherType2, ...] process2(items); //=> [otherType1, otherType2, ...] var processR1 = seq(filter, map(toOtherType), flatten); var processR2 = processR1(isOk); var processT1 = (isOk, items) => items.filter(isOk).map(toOtherType).flatten() var processT2 = items => processT1(isOk, items)
var processT1 = (isOk, items) => items.filter(isOk).map(toOtherType).flatten(); var processT2 = partial(processT1, isOk);