lib.isFunction: save an attribute lookup
This commit is contained in:
+5
-1
@@ -1123,7 +1123,11 @@ in
|
||||
isFunction : Any -> Bool
|
||||
```
|
||||
*/
|
||||
isFunction = f: builtins.isFunction f || (f ? __functor && isFunction (f.__functor f));
|
||||
isFunction =
|
||||
let
|
||||
isFunction = builtins.isFunction;
|
||||
in
|
||||
f: isFunction f || (f ? __functor && isFunction (f.__functor f));
|
||||
|
||||
/**
|
||||
`mirrorFunctionArgs f g` creates a new function `g'` with the same behavior as `g` (`g' x == g x`)
|
||||
|
||||
Reference in New Issue
Block a user