3 ms·
Can rewrite the example from the post: uniqueAuthors = books |> List.map .authors |> List.concat
by nivertech 9y ago
Can rewrite the example from the post:
uniqueAuthors =
books
|> List.map .authors
|> List.concat
|> Set.fromList
|> Set.size
as
uniqueAuthors =
books
|> List.concatMap .authors
|> Set.fromList
|> Set.size