concatMapStringsSep
lib.concatMapStringsSep
Docs pulled from | This Revision | 13 minutes ago
Maps a function over a list of strings and then concatenates the result with the specified separator interspersed between elements.
Inputs
sep
- Separator to add between elements
f
- Function to map over the list
list
- List of input strings
Type
concatMapStringsSep :: string -> (a -> string) -> [a] -> string
Examples
lib.strings.concatMapStringsSep
usage example
concatMapStringsSep "-" (x: toUpper x) ["foo" "bar" "baz"]
=> "FOO-BAR-BAZ"
Noogle detected
Implementation
The following is the current implementation of this function.
concatMapStringsSep =
sep:
f:
list: concatStringsSep sep (map f list);