aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJechol Lee <mr.jechol@gmail.com>2020-08-14 19:53:50 +0900
committerLouis Pilfold <louis@lpil.uk>2020-08-14 11:59:46 +0100
commit96192b07807fb6afbbcac3166401b6795b214ff9 (patch)
tree08234098901a54b199652fdde6ee1da838b3cc9a
parentd081016a6e42832156d99126255660b841be6883 (diff)
downloadgleam_stdlib-96192b07807fb6afbbcac3166401b6795b214ff9.tar.gz
gleam_stdlib-96192b07807fb6afbbcac3166401b6795b214ff9.zip
gleam format
-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) {