Skip to content

Commit 57ce477

Browse files
committed
Format code
1 parent 35d5c73 commit 57ce477

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/gleam/list.gleam

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ pub fn contains(list: List(a), any elem: a) -> Bool {
140140
pub fn head(list: List(a)) -> Result(a, Nil) {
141141
case list {
142142
[] -> Error(Nil)
143-
[x, ..] -> Ok(x)
143+
[x, .._] -> Ok(x)
144144
}
145145
}
146146

@@ -454,7 +454,12 @@ pub fn fold_right(list: List(a), from initial: b, with fun: fn(a, b) -> b) -> b
454454
}
455455
}
456456

457-
fn do_index_fold(over: List(a), acc: b, with: fn(Int, a, b) -> b, index: Int) -> b {
457+
fn do_index_fold(
458+
over: List(a),
459+
acc: b,
460+
with: fn(Int, a, b) -> b,
461+
index: Int,
462+
) -> b {
458463
case over {
459464
[] -> acc
460465
[first, ..rest] ->

src/gleam/queue.gleam

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,8 @@ fn check_equal(
215215
False -> False
216216
True -> check_equal(xs, x_tail, ys, y_tail, eq)
217217
}
218-
[], [_, ..], _, _ -> check_equal(list.reverse(x_tail), [], ys, y_tail, eq)
219-
_, _, [], [_, ..] -> check_equal(xs, x_tail, list.reverse(y_tail), [], eq)
218+
[], [_, .._], _, _ -> check_equal(list.reverse(x_tail), [], ys, y_tail, eq)
219+
_, _, [], [_, .._] -> check_equal(xs, x_tail, list.reverse(y_tail), [], eq)
220220
_, _, _, _ -> False
221221
}
222222
}

0 commit comments

Comments
 (0)