Skip to content

Function Application

Extract fn’s argument names from an attrset and call fn. Missing keys short-circuit with left s.

bend.apply ({ x, y }: x + y) { x = 10; y = 32; } # right 42
bend.apply ({ x, y }: x + y) { x = 10; } # left { x = 10; }

bend itself is callable — each function argument composes another apply lens:

bend ({ x, y }: x + y) { x = 10; y = 32; } # right 42
Contribute Community Sponsor