diff options
author | Colin Arnott <colin@urandom.co.uk> | 2023-01-30 21:22:02 +0000 |
---|---|---|
committer | Colin Arnott <colin@urandom.co.uk> | 2023-01-30 23:53:44 +0000 |
commit | 6ff66fcbd70c7d588bbf6e3b2cd41aa7d8a62fd2 (patch) | |
tree | 2514e62f38e786c506c5cd461d592f4291f1557c /lib/lists.nix | |
parent | 24525805b68d83b5f578db887040303c069fa710 (diff) | |
download | nixpkgs-6ff66fcbd70c7d588bbf6e3b2cd41aa7d8a62fd2.tar nixpkgs-6ff66fcbd70c7d588bbf6e3b2cd41aa7d8a62fd2.tar.gz nixpkgs-6ff66fcbd70c7d588bbf6e3b2cd41aa7d8a62fd2.tar.bz2 nixpkgs-6ff66fcbd70c7d588bbf6e3b2cd41aa7d8a62fd2.tar.lz nixpkgs-6ff66fcbd70c7d588bbf6e3b2cd41aa7d8a62fd2.tar.xz nixpkgs-6ff66fcbd70c7d588bbf6e3b2cd41aa7d8a62fd2.tar.zst nixpkgs-6ff66fcbd70c7d588bbf6e3b2cd41aa7d8a62fd2.zip |
lib: standardise attrset type syntax
There are a number of different syntaxes used for attrset type signatures in our doc strings, this change standardises upon one that uses :: for specifying attribute type, and ; terminators to be consistent with nix syntax. There are no bugs in the functions themselves, just that different syntaxes may confuse new users.
Diffstat (limited to 'lib/lists.nix')
-rw-r--r-- | lib/lists.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/lists.nix b/lib/lists.nix index 8b2c2d12801..9f69485b408 100644 --- a/lib/lists.nix +++ b/lib/lists.nix @@ -306,7 +306,7 @@ rec { /* Splits the elements of a list in two lists, `right` and `wrong`, depending on the evaluation of a predicate. - Type: (a -> bool) -> [a] -> { right :: [a], wrong :: [a] } + Type: (a -> bool) -> [a] -> { right :: [a]; wrong :: [a]; } Example: partition (x: x > 2) [ 5 1 2 3 4 ] @@ -374,7 +374,7 @@ rec { /* Merges two lists of the same size together. If the sizes aren't the same the merging stops at the shortest. - Type: zipLists :: [a] -> [b] -> [{ fst :: a, snd :: b}] + Type: zipLists :: [a] -> [b] -> [{ fst :: a; snd :: b; }] Example: zipLists [ 1 2 ] [ "a" "b" ] |