From 61af14a9219bff090b238f15c9def5453087aa5d Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 23 Jul 2015 17:03:02 +0200 Subject: Add foldl' primop --- doc/manual/expressions/builtins.xml | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'doc/manual') diff --git a/doc/manual/expressions/builtins.xml b/doc/manual/expressions/builtins.xml index 6bdfdd55c4b6..0b11e2f5a5c6 100644 --- a/doc/manual/expressions/builtins.xml +++ b/doc/manual/expressions/builtins.xml @@ -313,6 +313,19 @@ stdenv.mkDerivation { + builtins.foldl’ + op nul list + + Reduce a list by applying a binary operator, from + left to right, e.g. foldl’ op nul [x0 x1 x2 ...] = op (op + (op nul x0) x1) x2) .... The operator is applied + strictly, i.e., its arguments are evaluated first. For example, + foldl’ (x: y: x + y) 0 [1 2 3] evaluates to + 6. + + + + builtins.fromJSON e Convert a JSON string to a Nix -- cgit 1.4.1