mirror of
https://github.com/NixOS/nix
synced 2024-09-19 23:03:53 -04:00
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.
2 lines
79 B
Nix
2 lines
79 B
Nix
({ __functor = self: x: self.foo && x; foo = false; } // { foo = true; }) true
|