Skip to content

Instantly share code, notes, and snippets.

@dmitriid
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmitriid/1ab6d7b30d5825804b03 to your computer and use it in GitHub Desktop.
Save dmitriid/1ab6d7b30d5825804b03 to your computer and use it in GitHub Desktop.

Как было

> [1, [2], 3] |> List.flatten

Как стало

>> [1, [2], 3] |> List.flatten()

Стоп. Чтоа?

Но при этом

> [1, [2], 3] |> List.flatten |> Enum.map(fn x -> x * 2 end)

Нет. Это не то, что вы подумали. Это — логично и хорошо структурировано :-\

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment