diff options
author | Sebastian <s@porto5.com> | 2021-04-27 11:48:12 +1000 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2021-04-29 20:24:23 +0100 |
commit | 12fdf47b0e5e912ef771f1860cedca8b24477b44 (patch) | |
tree | f55200207e538c0d16bd213b3e06c5e1bc8a6279 | |
parent | 747d13dcc84e64ffb23fbf958b7a279fa029dcb0 (diff) | |
download | gleam_stdlib-12fdf47b0e5e912ef771f1860cedca8b24477b44.tar.gz gleam_stdlib-12fdf47b0e5e912ef771f1860cedca8b24477b44.zip |
Call do_combination_pairs recursively
-rw-r--r-- | src/gleam/list.gleam | 2 |
1 files changed, 1 insertions, 1 deletions
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)] } } } |