From 35a599b2846de3d673fbcffbacc95bc4ef2e77c7 Mon Sep 17 00:00:00 2001 From: Celestino Amoroso Date: Mon, 18 May 2026 08:56:44 +0200 Subject: [PATCH] operator length # supports linked-list --- operator-length.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/operator-length.go b/operator-length.go index 057b576..914b0c6 100644 --- a/operator-length.go +++ b/operator-length.go @@ -37,6 +37,8 @@ func evalLength(ctx kern.ExprContext, opTerm *scan.Term) (v any, err error) { } else if kern.IsDict(childValue) { m, _ := childValue.(*kern.DictType) v = int64(len(*m)) + } else if lls, ok := childValue.(*kern.LinkedList); ok { + v = int64(lls.Len()) } else if it, ok := childValue.(kern.Iterator); ok { v = int64(it.Count()) // if extIt, ok := childValue.(ExtIterator); ok && extIt.HasOperation(CountName) {