linked-list supports index assign and concatenation

This commit is contained in:
2026-07-13 11:34:25 +02:00
parent 072fd9af39
commit 4df222496d
7 changed files with 52 additions and 29 deletions
+3 -3
View File
@@ -14,11 +14,11 @@ import (
// -------- range term
type intPair struct {
a, b int
a, b int64
}
func (p *intPair) TypeName() string {
return kern.TypePair
return kern.TypeIntPair
}
func (p *intPair) ToString(opt kern.FmtOpt) string {
@@ -70,7 +70,7 @@ func evalRange(ctx kern.ExprContext, opTerm *scan.Term) (v any, err error) {
startIndex, _ := leftValue.(int64)
endIndex, _ := rightValue.(int64)
v = &intPair{int(startIndex), int(endIndex)}
v = &intPair{startIndex, endIndex}
return
}