aboutsummaryrefslogtreecommitdiff
path: root/help/deshape_reshape.md
diff options
context:
space:
mode:
authorrazetime <raghuallthetime@hotmail.com>2022-01-19 22:48:16 +0530
committerrazetime <raghuallthetime@hotmail.com>2022-01-19 22:48:16 +0530
commit2c50d91ec7eb8bc7890befe874a0b93729c2437e (patch)
treeeb621b86b3c8269ab2dd63bd3c628acdf3521059 /help/deshape_reshape.md
parent6c111f1e71e945f66977aecc3322318aa21beacc (diff)
add h2s remove copied output, ascii filenames
Diffstat (limited to 'help/deshape_reshape.md')
-rw-r--r--help/deshape_reshape.md31
1 files changed, 31 insertions, 0 deletions
diff --git a/help/deshape_reshape.md b/help/deshape_reshape.md
new file mode 100644
index 00000000..98e930b3
--- /dev/null
+++ b/help/deshape_reshape.md
@@ -0,0 +1,31 @@
+*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/deshape_reshape.html).*
+
+# Barb (`⥊`)
+
+## `⥊ 𝕩`: Deshape
+
+Put all elements of `𝕩` in a rank 1 array, converting to array if necessary.
+
+ ⥊ 1
+
+ ⥊ 1‿2 ≍ 3‿4
+
+
+
+## `𝕨 ⥊ 𝕩`: Reshape
+
+Put all elements of `𝕩` in an array of shape `𝕨`, adding or removing elements if necessary.
+
+A single element in `𝕩` can be a function, which will be replaced with an appropriate length:
+- `∘` Exact fit
+- `⌊` Round length down, discarding elements
+- `⌽` Round length up
+- `↑` Round length up, and use element fill to add extra elements.
+
+ 3‿3 ⥊ 3
+
+ 2‿⌽‿2 ⥊ 1‿2‿3
+
+ 2‿↑‿2 ⥊ 1‿2‿3
+
+