slightly better parsing

This commit is contained in:
Adam Millerchip 2022-12-05 23:48:43 +09:00
parent 9e6a872461
commit a6911216fa

View file

@ -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)