From 582df464b5a344926bd04f3035b1568c16194f84 Mon Sep 17 00:00:00 2001 From: Xie Yuheng Date: Mon, 24 Jun 2024 06:35:31 +0800 Subject: [PATCH] `lift` -- no need to handle nothings --- src/propagator/definePrimitive.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/propagator/definePrimitive.ts b/src/propagator/definePrimitive.ts index 79dae0d..0035ba6 100644 --- a/src/propagator/definePrimitive.ts +++ b/src/propagator/definePrimitive.ts @@ -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(