Skip to content

Instantly share code, notes, and snippets.

@MonkeyIsNull
Last active October 28, 2015 19:16
Show Gist options
  • Save MonkeyIsNull/fd9f79934f37de88692c to your computer and use it in GitHub Desktop.
Save MonkeyIsNull/fd9f79934f37de88692c to your computer and use it in GitHub Desktop.
File.read!("/etc/passwd") |>
String.split("\n") |>
Enum.map(&(String.split(&1, ":"))) |>
Enum.map(&(Enum.at(&1,3))) |>
Enum.filter(&(!is_nil(&1))) |>
Enum.map(&(String.to_integer(&1))) |>
Enum.sort(&(&1 > &2)) |>
Enum.take(5)
[239, 238, 237, 236, 235]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment