strings.nix: Fix overly monomorphic type signature comments

These functions work on lists of anything, not just lists of strings.
This commit is contained in:
Niklas Hambüchen 2021-07-04 20:52:48 +02:00 committed by GitHub
parent 8148ffc930
commit 5db6b909cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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