Applies the transform corresponding to the first matching condition, or the fallback transform if no predicate from conditions matches.
fallback
conditions
import * as L from "flurp/logic";const f = L.branch([ [N.isGt(100), N.multiply(0.9)], [N.isGt(50), N.subtract(5)], [N.isGt(0), L.identity],], L.always(0));f(500); // 450f(100); // 95f(30); // 30f(-10) // 0
Applies the transform corresponding to the first matching condition, or the
fallback
transform if no predicate fromconditions
matches.Example