query
On this page

functionArgs

lib.trivial.functionArgs

Docs pulled from | This Revision | 10 minutes ago


Extract the expected function arguments from a function. This works both with nix-native { a, b ? foo, ... }: style functions and functions with args set with 'setFunctionArgs'. It has the same return type and semantics as builtins.functionArgs. setFunctionArgs : (a → b) → Map String Bool.

Inputs

f

1. Function argument


Noogle detected

Aliases

Implementation

The following is the current implementation of this function.

functionArgs =
    f:
    if f ? __functor then
      f.__functionArgs or (functionArgs (f.__functor f))
    else
      builtins.functionArgs f;