Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
New benchee API
list = Enum.to_list(1..10_000)
map_fun = fn(i) -> [i, i * i] end{
"flat_map" => fn -> Enum.flat_map(list, map_fun) end,
"map.flatten" => fn -> list |> |> List.flatten end
formatters: [
html: [file: "samples_output/flat_map.html"],
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment