all repos — min @ 761fe344703c6a6bf664b59fd9197f83e39dfdde

A small but practical concatenative programming language.

Added tests, ensured lambda-bind works on paths too.
h3rald h3rald@h3rald.com
Fri, 22 May 2026 07:03:24 +0200
commit

761fe344703c6a6bf664b59fd9197f83e39dfdde

parent

952b6d4b20380fc7809c549debe66bc1c31cae8e

2 files changed, 11 insertions(+), 1 deletions(-)

jump to
M minpkg/lib/min_global.nimminpkg/lib/min_global.nim

@@ -593,6 +593,8 @@ let sym = vals[0]

var q1 = vals[1] var symbol: string symbol = sym.getString + if not symbol.contains re(USER_PATH_SYMBOL_REGEX): + raiseInvalid("Symbol identifier '$1' contains invalid characters." % symbol) info "[bind] $1 = $2" % [symbol, $q1] let res = i.scope.setSymbol(symbol, MinOperator(kind: minValOp, val: q1)) if not res:

@@ -604,8 +606,10 @@ let sym = vals[0]

var q1 = vals[1] var symbol: string symbol = sym.getString + if not symbol.contains re(USER_PATH_SYMBOL_REGEX): + raiseInvalid("Symbol identifier '$1' contains invalid characters." % symbol) info "[lambda-bind] $1 = $2" % [symbol, $q1] - let res = i.scope.setSymbol(symbol, MinOperator(kind: minValOp, val: q1)) + let res = i.scope.setSymbol(symbol, MinOperator(kind: minValOp, val: q1, lambda: true)) if not res: raiseUndefined("Attempting to lambda-bind undefined symbol: " & symbol)
M tests/global.mintests/global.min

@@ -838,6 +838,12 @@ while

x y t + + 20300 == ) test.assert + ( + {2 :value (3 *) ^times3} :test1 + test1.value test1.times3 @test1.value + test1.value 6 == + ) test.assert + test.report ;; Tidy up stack.clear