From 12fdf47b0e5e912ef771f1860cedca8b24477b44 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Tue, 27 Apr 2021 11:48:12 +1000 Subject: Call do_combination_pairs recursively --- src/gleam/list.gleam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gleam/list.gleam b/src/gleam/list.gleam index 6170496..1fcd2d8 100644 --- a/src/gleam/list.gleam +++ b/src/gleam/list.gleam @@ -1485,7 +1485,7 @@ fn do_combination_pairs(items: List(a)) -> List(List(tuple(a, a))) { [] -> [] [x, ..xs] -> { let first_combinations = map(xs, with: fn(other) { tuple(x, other) }) - [first_combinations, combination_pairs(xs)] + [first_combinations, ..do_combination_pairs(xs)] } } } -- cgit v1.2.3