From c5845fa29b5059739b6f7a5b0c7da21e752de4fa Mon Sep 17 00:00:00 2001 From: Louis Pilfold Date: Wed, 2 Sep 2020 22:49:29 +0100 Subject: list.partition --- test/gleam/list_test.gleam | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test') diff --git a/test/gleam/list_test.gleam b/test/gleam/list_test.gleam index eff9fac..ff94c3b 100644 --- a/test/gleam/list_test.gleam +++ b/test/gleam/list_test.gleam @@ -475,3 +475,9 @@ pub fn key_set_test() { |> list.key_set(1, 100) |> should.equal([tuple(5, 0), tuple(4, 1), tuple(1, 100)]) } + +pub fn partition_test() { + [1, 2, 3, 4, 5, 6, 7] + |> list.partition(int.is_odd) + |> should.equal(tuple([1, 3, 5, 7], [2, 4, 6])) +} -- cgit v1.2.3