aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gleam/iterator.gleam11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gleam/iterator.gleam b/src/gleam/iterator.gleam
index 7283c15..2365317 100644
--- a/src/gleam/iterator.gleam
+++ b/src/gleam/iterator.gleam
@@ -168,7 +168,11 @@ pub fn to_list(iterator: Iterator(element)) -> List(element) {
|> list.reverse
}
-fn do_take(continuation: fn() -> Action(e), desired: Int, acc: List(e)) -> List(e) {
+fn do_take(
+ continuation: fn() -> Action(e),
+ desired: Int,
+ acc: List(e),
+) -> List(e) {
case desired > 0 {
True -> case continuation() {
Continue(
@@ -262,7 +266,10 @@ pub fn map(over iterator: Iterator(a), with f: fn(a) -> b) -> Iterator(b) {
|> Iterator
}
-fn do_filter(continuation: fn() -> Action(e), predicate: fn(e) -> Bool) -> fn() -> Action(e) {
+fn do_filter(
+ continuation: fn() -> Action(e),
+ predicate: fn(e) -> Bool,
+) -> fn() -> Action(e) {
fn() {
case continuation() {
Continue(e, iterator) -> case predicate(e) {