aboutsummaryrefslogtreecommitdiff
path: root/aoc-2020-gleam/src/ext/iteratorx.gleam
diff options
context:
space:
mode:
Diffstat (limited to 'aoc-2020-gleam/src/ext/iteratorx.gleam')
-rw-r--r--aoc-2020-gleam/src/ext/iteratorx.gleam4
1 files changed, 2 insertions, 2 deletions
diff --git a/aoc-2020-gleam/src/ext/iteratorx.gleam b/aoc-2020-gleam/src/ext/iteratorx.gleam
index 4e184bd..0e59f17 100644
--- a/aoc-2020-gleam/src/ext/iteratorx.gleam
+++ b/aoc-2020-gleam/src/ext/iteratorx.gleam
@@ -1,4 +1,4 @@
-import gleam/iterator.{Iterator, Next} as iter
+import gleam/iterator.{type Iterator, Next} as iter
pub fn length(iterator: Iterator(a)) -> Int {
iterator
@@ -7,7 +7,7 @@ pub fn length(iterator: Iterator(a)) -> Int {
pub fn count(iterator: Iterator(a), satisfying predicate: fn(a) -> Bool) -> Int {
iterator
- |> iter.filter(for: predicate)
+ |> iter.filter(keeping: predicate)
|> length
}