summaryrefslogtreecommitdiff
path: root/ideas
diff options
context:
space:
mode:
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)
+
+
+
+