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;