mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-30 16:10:36 +00:00
lib.functionArgs: save a function call on every lookup
This commit is contained in:
@@ -1101,11 +1101,10 @@ in
|
|||||||
```
|
```
|
||||||
*/
|
*/
|
||||||
functionArgs =
|
functionArgs =
|
||||||
f:
|
let
|
||||||
if f ? __functor then
|
functionArgs = builtins.functionArgs;
|
||||||
f.__functionArgs or (functionArgs (f.__functor f))
|
in
|
||||||
else
|
f: if f ? __functor then f.__functionArgs or (functionArgs (f.__functor f)) else functionArgs f;
|
||||||
builtins.functionArgs f;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Check whether something is a function or something
|
Check whether something is a function or something
|
||||||
|
|||||||
Reference in New Issue
Block a user