streamlined q-form related calls
This commit is contained in:
+2
-2
@@ -468,7 +468,7 @@ func NewClyx(libfname string, libCode string) *Clyx {
|
||||
c.words["loop"] = func() { body, cond := c.pop().([]any), c.pop().([]any); for { c.execQForm(cond); if !isTruthy(c.pop()) { break }; c.execQForm(body) } }
|
||||
c.words["hsargs"] = func() { c.stack = append(c.stack, toAnySlice(os.Args)) }
|
||||
c.words["hsexit"] = func() { os.Exit(int(toInt(c.pop()))) }
|
||||
c.words["l2s"] = func() {
|
||||
c.words["q2s"] = func() {
|
||||
l := c.pop().([]any)
|
||||
var sb strings.Builder
|
||||
for _, val := range l {
|
||||
@@ -512,7 +512,7 @@ func NewClyx(libfname string, libCode string) *Clyx {
|
||||
regMath("exp", math.Exp)
|
||||
regMath("log", math.Log)
|
||||
|
||||
c.Run(`"::" [ next defw ] defw :: readf [ "r" fopen dup read swap close ] :: src [ readf l2s i ]`)
|
||||
c.Run(`"::" [ next defw ] defw :: readf [ "r" fopen dup read swap close ] :: src [ readf q2s i ]`)
|
||||
|
||||
if libfname == "" {
|
||||
c.Run(libCode)
|
||||
|
||||
Reference in New Issue
Block a user