Implement global ++/-- functions

This commit is contained in:
Laria 2023-03-29 22:36:38 +02:00
parent e31dc3d585
commit 0e9f8ae0ee

View file

@ -108,6 +108,9 @@
is := -named 'is (partial has identity)
++ := { x -> + x 1 }
-- := { x -> - x 1 }
-raw-substring := builtins.substring
substr := {
start s ->
@ -136,7 +139,7 @@
sep-len := len sep
parts := []
loop {
if (maxlen-reached (+ 1 (len parts))) {
if (maxlen-reached (++ (len parts))) {
parts = [~parts s]
false
} {
@ -239,6 +242,8 @@
'!< -> !<
'!>= -> !>=
'!<= -> !<=
'++ -> ++
'-- -> --
'keach -> keach
'each -> each
'get-optional -> get-optional