-
-
Save edmz/e850f0e1b66614487177 to your computer and use it in GitHub Desktop.
Elixir version of[1] as revised by José Valim
1. http://devblog.avdi.org/2013/10/16/sorting-lines-in-5-languages/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this version is by José Valim, my version was way more verbose and not quite as elixir-ish. | |
[input, output] = System.argv | |
File.write!(output, File.stream!(input) |> Enum.sort |> Enum.join("")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
|> Enum.join("")
part is unnecessary.