function _reject(data, predi){
return _filter(data, function(val){
return !predi(val)})
}
_filter(users, function(user){
return user.age>30
})
_reject(users, function(user){
return user.age>30
})
function _negate(func){
return function(val){
return !func(val)
}
}
function _reject(data, predi){
return _filter(data, _negate(predi))
}
const _compact = _filter(_identity)
_compact([1, 2, 0, false, null, {}])