summaryrefslogtreecommitdiff
path: root/ideas
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2024-07-23 17:00:56 +0100
committerubq323 <ubq323@ubq323.website>2024-07-23 17:00:56 +0100
commitaa0485fe33204169724d020f9c5e3b91e558ab1e (patch)
tree909ea369aa38854fe98396c61ecab6c600533f7a /ideas
parent726f9e814b29b4496d07c92323dc55dcf93c2a87 (diff)
add pend builtin function
Diffstat (limited to 'ideas')
-rw-r--r--ideas35
1 files changed, 35 insertions, 0 deletions
diff --git a/ideas b/ideas
new file mode 100644
index 0000000..9717cb6
--- /dev/null
+++ b/ideas
@@ -0,0 +1,35 @@
+(, a b)
+pend.
+concatenates arrays, but enlists anything that isnt already an array
+thus
+ (, x xs) (, xs x) is like append or prepend
+ (, x y) is pair
+ (, x) is enlist
+ (, xs ys) is extend
+if you really want an array to be inside another array
+ you can do (, xs (, ys)) or equivalently (, xs [ys])
+ this is probably the rarer case so that's good
+this always returns (allocates) a new object. that's probably fine
+most of the time
+if you want it to modify inplace have a (,! ...) form
+but need to specify which one to modify ...
+ (,! x xs) (,! xs x) are unambiguous
+ but should (,! xs ys) copy ys to xs or vice versa?
+ maybe something like (,!< xs ys) (,!> xs ys) respectively
+ or maybe more generally (,! xs (! ys)) but that's uglier
+ (,! xs !ys) ???
+this also does string concatenation.
+have a variant (,, ...) maybe that puts spaces in between
+have a variant that uniions hashes
+ does (, {'x 10} {'y 20}) do {'x 10 'y 20} or [{'x 10} {'y 20}] ?
+ probably see which is commoner
+
+
+
+separate strings from symbols
+symbols are atomic and interned
+strings are just arrays of characters (codepoints)
+
+
+
+