change the way to read a token beginning with a colon.

added more primitive functions to the core module
This commit is contained in:
2025-09-26 00:32:33 +09:00
parent 4c000c2c9c
commit 0128fe88dc
13 changed files with 250 additions and 75 deletions

View File

@ -83,6 +83,8 @@ do { | k | set k 20; printf "k=%d\n" k; };
* bit-xor
* bit-not
* bit-shift
* bit-left-shift
* bit-right-shift
## Defining a function
@ -149,9 +151,8 @@ x:print
## Redefining a primitive function
```
set prim-plus +
fun + (a b ...)
prim-plus a b 9999
fun + (a b) {
core.+ a b 9999
)
printf "%d\n" (+ 10 20)
```