Skip to content

Commit 41c4a62

Browse files
committed
Value: builtin2: upd
M src/Nix/Value.hs
1 parent a42bbb9 commit 41c4a62

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Nix/Value.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -642,20 +642,20 @@ builtin
642642
=> VarName -- ^ function name
643643
-> ( NValue t f m
644644
-> m (NValue t f m)
645-
) -- ^ function
645+
) -- ^ unary function
646646
-> m (NValue t f m)
647647
builtin = (pure .) . nvBuiltin
648648

649649

650650
builtin2
651651
:: (MonadThunk t m (NValue t f m), MonadDataContext f m)
652-
=> VarName
652+
=> VarName -- ^ function name
653653
-> ( NValue t f m
654654
-> NValue t f m
655655
-> m (NValue t f m)
656-
)
656+
) -- ^ binary function
657657
-> m (NValue t f m)
658-
builtin2 name f = builtin name $ \a -> builtin name $ \b -> f a b
658+
builtin2 = ((.) <*> (.)) . builtin
659659

660660

661661
builtin3

0 commit comments

Comments
 (0)