slightly better parsing
This commit is contained in:
parent
9e6a872461
commit
a6911216fa
1 changed files with 1 additions and 1 deletions
|
@ -38,7 +38,7 @@ defmodule Day5 do
|
||||||
|
|
||||||
procedure =
|
procedure =
|
||||||
raw_procedure
|
raw_procedure
|
||||||
|> String.split(["\n", " ", "move", "from", "to"], trim: true)
|
|> String.split(["move ", " from ", " to ", "\n"], trim: true)
|
||||||
|> Enum.map(&String.to_integer/1)
|
|> Enum.map(&String.to_integer/1)
|
||||||
|> Enum.chunk_every(3)
|
|> Enum.chunk_every(3)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue