Skip to content

Commit 1271be2

Browse files
committed
Value: builtin3: upd
1 parent 41c4a62 commit 1271be2

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/Nix/Value.hs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -660,15 +660,14 @@ builtin2 = ((.) <*> (.)) . builtin
660660

661661
builtin3
662662
:: (MonadThunk t m (NValue t f m), MonadDataContext f m)
663-
=> VarName
663+
=> VarName -- ^ function name
664664
-> ( NValue t f m
665665
-> NValue t f m
666666
-> NValue t f m
667667
-> m (NValue t f m)
668-
)
668+
) -- ^ ternary function
669669
-> m (NValue t f m)
670-
builtin3 name f =
671-
builtin name $ \a -> builtin name $ \b -> builtin name $ \c -> f a b c
670+
builtin3 = liftA3 (.) (.) ((.) . (.)) ((.) . (.)) . builtin
672671

673672
-- *** @F: Evaluation -> NValue@
674673

0 commit comments

Comments
 (0)