diff options
author | Niklas Hambüchen <mail@nh2.me> | 2021-07-04 20:52:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-04 20:52:48 +0200 |
commit | 5db6b909cd0e544a5466fb0279d6aeaf202b0cf5 (patch) | |
tree | eea7d62a9da110e1829780ad17eb9aacc04a9646 /lib/strings.nix | |
parent | 8148ffc930249aacb7d206e4505c83cde0bb9fc0 (diff) |
strings.nix: Fix overly monomorphic type signature comments
These functions work on lists of anything, not just lists of strings.
Diffstat (limited to 'lib/strings.nix')
-rw-r--r-- | lib/strings.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/strings.nix b/lib/strings.nix index 49fa0196a0b2..86c92bdaa15b 100644 --- a/lib/strings.nix +++ b/lib/strings.nix @@ -95,7 +95,7 @@ rec { result with the specified separator interspersed between elements. - Type: concatMapStringsSep :: string -> (string -> string) -> [string] -> string + Type: concatMapStringsSep :: string -> (a -> string) -> [a] -> string Example: concatMapStringsSep "-" (x: toUpper x) ["foo" "bar" "baz"] @@ -112,7 +112,7 @@ rec { /* Same as `concatMapStringsSep`, but the mapping function additionally receives the position of its argument. - Type: concatIMapStringsSep :: string -> (int -> string -> string) -> [string] -> string + Type: concatIMapStringsSep :: string -> (int -> a -> string) -> [a] -> string Example: concatImapStringsSep "-" (pos: x: toString (x / pos)) [ 6 6 6 ] |