diff --git a/src/day2_p1.gleam b/src/day2_p1.gleam index 139f87b..89fc980 100644 --- a/src/day2_p1.gleam +++ b/src/day2_p1.gleam @@ -1,7 +1,7 @@ import gleam/int import gleam/io import gleam/iterator -import gleam/list.{count, filter_map, map} +import gleam/list.{count, filter, filter_map, reverse} import gleam/string import stdin.{stdin} @@ -46,6 +46,6 @@ fn parse(it: iterator.Iterator(String)) -> List(List(Int)) { } } }) - |> list.filter(fn(l) { list.length(l) > 0 }) - |> list.reverse + |> filter(fn(l) { list.length(l) > 0 }) + |> reverse } diff --git a/src/day2_p2.gleam b/src/day2_p2.gleam index f173d27..921ce54 100644 --- a/src/day2_p2.gleam +++ b/src/day2_p2.gleam @@ -1,7 +1,9 @@ import gleam/int import gleam/io import gleam/iterator -import gleam/list.{any, count, filter_map, flatten, length, range, split} +import gleam/list.{ + any, count, filter, filter_map, flatten, length, range, reverse, split, +} import gleam/string import stdin.{stdin} @@ -54,6 +56,6 @@ fn parse(it: iterator.Iterator(String)) -> List(List(Int)) { } } }) - |> list.filter(fn(l) { list.length(l) > 0 }) - |> list.reverse + |> filter(fn(l) { list.length(l) > 0 }) + |> reverse }