From 6ad7706b755a5a8f1d166c885876456fbe8efade Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 5 Nov 2022 15:48:28 +0000 Subject: [PATCH] chore: autopublish 2022-11-05T15:48:28Z --- sclin-docs/commands.md | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/sclin-docs/commands.md b/sclin-docs/commands.md index c22c2b4..9b0215e 100644 --- a/sclin-docs/commands.md +++ b/sclin-docs/commands.md @@ -1417,7 +1417,7 @@ Stack: ``` a -> _ ``` Shuffles `a`. ``` 10O>a shuf >A --> [0 9 8 4 7 1 6 5 2 3] +-> [2 0 7 6 4 1 8 9 3 5] ``` @@ -1765,7 +1765,7 @@ See [``` map ```](#cmd-map) for the signature of `f`. ``` ``` [1 2 3 4 5] \$rng sort --> [3 4 2 5 1] +-> [5 2 4 3 1] ``` @@ -1812,3 +1812,27 @@ See [``` map ```](#cmd-map) for the signature of `f`. -> {0=>[""] 2=>["ab" "ac" "bc"] 1=>["a" "b" "c"] 3=>["abc"]} ``` + +## CMD: [``` span ```](#cmd-span) + +Stack: ``` a f' -> ARR[_ _]' ``` + +Equivalent to a combination of [``` tk* ```](#cmd-tk-1) and [``` dp* ```](#cmd-dp-1). +See [``` fltr ```](#cmd-fltr) for the signature of `f`. +``` +[5 1 2 4 3] 2.% span +-> [[5 1] [2 4 3]] +``` + + +## CMD: [``` pack ```](#cmd-pack) + +Stack: ``` a f' -> _' ``` + +Groups consecutive duplicate runs of `a` based on predicate `f`. +See [``` sort~ ```](#cmd-sort-1) for the signature of `f`. +``` +[1 1 2 3 3 4 6 4 4] \=` pack +-> [[1 1] [2] [3 3] [4] [6] [4 4]] +``` +