From 038ca5b5ade57bbac098df21f21ec6ba056ae299 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Mon, 26 Apr 2021 12:55:26 +1000 Subject: Rename combinations_by to combinations --- test/gleam/list_test.gleam | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'test') diff --git a/test/gleam/list_test.gleam b/test/gleam/list_test.gleam index 294c9f4..ff812b6 100644 --- a/test/gleam/list_test.gleam +++ b/test/gleam/list_test.gleam @@ -654,23 +654,23 @@ pub fn last_test() { |> should.equal(Ok(5)) } -pub fn combinations_by_test() { - list.combinations_by([1, 2, 3], 0) +pub fn combinations_test() { + list.combinations([1, 2, 3], by: 0) |> should.equal([[]]) - list.combinations_by([1, 2, 3], 1) + list.combinations([1, 2, 3], by: 1) |> should.equal([[1], [2], [3]]) - list.combinations_by([1, 2, 3], 2) + list.combinations([1, 2, 3], by: 2) |> should.equal([[1, 2], [1, 3], [2, 3]]) - list.combinations_by([1, 2, 3], 3) + list.combinations([1, 2, 3], by: 3) |> should.equal([[1, 2, 3]]) - list.combinations_by([1, 2, 3], 4) + list.combinations([1, 2, 3], by: 4) |> should.equal([]) - list.combinations_by([1, 2, 3, 4], 3) + list.combinations([1, 2, 3, 4], 3) |> should.equal([[1, 2, 3], [1, 2, 4], [1, 3, 4], [2, 3, 4]]) } -- cgit v1.2.3