mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 15:33:13 +00:00
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 New Issue
Block a user