3
0
Fork 0
forked from mirrors/nixpkgs

lib/trivial.nix: add type for fix

This commit is contained in:
Profpatsch 2017-04-12 01:46:32 +02:00
parent ce4ff6b4f4
commit 46a36d82ee

View file

@ -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;