Skip to content

Commit 12fdf47

Browse files
sportolpil
authored andcommitted
Call do_combination_pairs recursively
1 parent 747d13d commit 12fdf47

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/gleam/list.gleam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1485,7 +1485,7 @@ fn do_combination_pairs(items: List(a)) -> List(List(tuple(a, a))) {
14851485
[] -> []
14861486
[x, ..xs] -> {
14871487
let first_combinations = map(xs, with: fn(other) { tuple(x, other) })
1488-
[first_combinations, combination_pairs(xs)]
1488+
[first_combinations, ..do_combination_pairs(xs)]
14891489
}
14901490
}
14911491
}

0 commit comments

Comments
 (0)