Last active
September 25, 2022 19:55
-
-
Save royratcliffe/9ad93d7b116ae5706ddaf05cc0b1bc32 to your computer and use it in GitHub Desktop.
Elixir
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 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
# Reads all lines from standard input. Trims the trailing new-line characters. | |
# Converts each line's characters to an integer. | |
IO.stream(:stdio, :line) | |
|> Enum.map(&String.trim/1) | |
|> Enum.map(&String.to_integer/1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment