From ea8d3f5a6fe8b4601c99abd4133b04196a494cb3 Mon Sep 17 00:00:00 2001 From: TudbuT Date: Sun, 13 Oct 2024 23:18:36 +0200 Subject: [PATCH] add micromap and list clear --- spl/std.spl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spl/std.spl b/spl/std.spl index eaf2c3d..6493ee6 100644 --- a/spl/std.spl +++ b/spl/std.spl @@ -309,6 +309,7 @@ construct List { to-stack { .. | :array:to-stack } to-str { str | :array:to-str } sub { [any] | :array:sub } + clear { | :=array<0 anew> } } construct _GrowingArray { ; @@ -423,6 +424,9 @@ construct MicroMap { foreach { | with callable this ; callable this:pairs:foreach } + clear { | with this ; + this:pairs:clear; + } } construct Range {