Skip to content

Commit

Permalink
lift -- no need to handle nothings
Browse files Browse the repository at this point in the history
  • Loading branch information
xieyuheng committed Jun 23, 2024
1 parent 4895420 commit 582df46
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/propagator/definePrimitive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,7 @@ function lift(
fn = maybeUnwrapSupported(fn)
fn = skipIncompleteInputs(fn)

return (...inputs) => {
const args = inputs.map((input) => input.content)
if (args.find(isNothing)) {
return nothing
} else {
return fn(...args)
}
}
return (...inputs) => fn(...inputs.map((input) => input.content))
}

function maybeUnwrapSupported(
Expand Down

0 comments on commit 582df46

Please sign in to comment.