1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-12 19:05:08 +02:00

Add functors (callable attribute sets).

With this, attribute sets with a `__functor` attribute can be applied
just like normal functions. This can be used to attach arbitrary
metadata to a function without callers needing to treat it specially.
This commit is contained in:
Shea Levy 2014-10-15 22:04:48 -04:00
parent 8cfe939b0f
commit 997defa166
4 changed files with 15 additions and 1 deletions

View file

@ -0,0 +1 @@
true

View file

@ -0,0 +1 @@
({ __functor = self: x: self.foo && x; foo = false; } // { foo = true; }) true