Skip to content

Commit 01cac5a

Browse files
pendletonglpil
authored andcommitted
fix: More corrections of naming
1 parent 0c41552 commit 01cac5a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/gleam/list.gleam

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1842,12 +1842,12 @@ pub fn permutations(list: List(a)) -> List(List(a)) {
18421842
fn zipper(list: List(a), rest: List(a), acc: List(List(a))) -> List(List(a)) {
18431843
case list {
18441844
[] -> reverse(acc)
1845-
[el, ..tail] ->
1845+
[head, ..tail] ->
18461846
zip_prepend(
1847-
el,
1847+
head,
18481848
permutations(reverse_and_prepend(rest, tail)),
18491849
tail,
1850-
[el, ..rest],
1850+
[head, ..rest],
18511851
acc,
18521852
)
18531853
}
@@ -1862,7 +1862,8 @@ fn zip_prepend(
18621862
) -> List(List(a)) {
18631863
case permutations {
18641864
[] -> zipper(list_1, list_2, acc)
1865-
[h, ..rest] -> zip_prepend(el, rest, list_1, list_2, [[el, ..h], ..acc])
1865+
[head, ..tail] ->
1866+
zip_prepend(el, tail, list_1, list_2, [[el, ..head], ..acc])
18661867
}
18671868
}
18681869

0 commit comments

Comments
 (0)