query
On this page

foldArgs

lib.misc.foldArgs

Docs pulled from | This Revision | 18 days ago
Deprecated


Contribute
Enhance the ecosystem with your expertise! Contribute to fill the gaps in documentation. Your input can make a difference.

Noogle detected

Aliases

Implementation

The following is the current implementation of this function.

merger: f: init: x:
    let
      arg = (merger init (defaultMergeArg init x));
      # now add the function with composed args already applied to the final attrs
      base = (
        setAttrMerge "passthru" { } (f arg) (
          z:
          z
          // {
            function = foldArgs merger f arg;
            args = (attrByPath [ "passthru" "args" ] { } z) // x;
          }
        )
      );
      withStdOverrides = base // {
        override = base.passthru.function;
      };
    in
    withStdOverrides