blob: fd4cfd0bb2c83e30f66f6e220d971fffdc4f0ac6 [file] [log] [blame] [edit]
import { curry } from './curry.js'
function whenFn(
predicate, whenTrueFn, input
){
if (!predicate(input)) return input
return whenTrueFn(input)
}
export const when = curry(whenFn)