forked from mirrors/nixpkgs
lib/trivial.nix: add type for fix
This commit is contained in:
parent
ce4ff6b4f4
commit
46a36d82ee
|
@ -56,6 +56,8 @@ rec {
|
|||
# nix-repl> fix f
|
||||
# { bar = "bar"; foo = "foo"; foobar = "foobar"; }
|
||||
#
|
||||
# Type: fix :: (a -> a) -> a
|
||||
#
|
||||
# See https://en.wikipedia.org/wiki/Fixed-point_combinator for further
|
||||
# details.
|
||||
fix = f: let x = f x; in x;
|
||||
|
|
Loading…
Reference in a new issue