aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLouis Pilfold <louis@lpil.uk>2020-09-02 22:49:29 +0100
committerLouis Pilfold <louis@lpil.uk>2020-09-02 22:50:32 +0100
commitc5845fa29b5059739b6f7a5b0c7da21e752de4fa (patch)
tree08cf40c33b1c34fb0c884e3744ccded440989213 /test
parent38197b4948e212404661468b0ebd2afacf7452ba (diff)
downloadgleam_stdlib-c5845fa29b5059739b6f7a5b0c7da21e752de4fa.tar.gz
gleam_stdlib-c5845fa29b5059739b6f7a5b0c7da21e752de4fa.zip
list.partition
Diffstat (limited to 'test')
-rw-r--r--test/gleam/list_test.gleam6
1 files changed, 6 insertions, 0 deletions
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]))
+}