map, filter and cat return an iterator

This commit is contained in:
2026-05-09 17:42:04 +02:00
parent e5a61b5638
commit 45faea7620
6 changed files with 182 additions and 90 deletions
+1 -2
View File
@@ -54,8 +54,7 @@ func TestFuncs2(t *testing.T) {
inputs := []inputType{
/* 1 */ {`sum=func(a,b){a+b}; sum(1,2)`, int64(3), nil},
/* 2 */ {`sum=func(a,b){a+b}; sum(1)`, nil, `sum(): too few params -- expected 2, got 1`},
/* 3 */ {`["1", "2", "3"] map int()`, nil, `int(): too few params -- expected 1, got 0`},
/* 4 */ {`builtin "iterator"; times=func(a,b){a*b}; run($(["1", "2", "3"]), times)`, nil, `operator(): missing params -- a, b`},
/* 3 */ {`builtin "iterator"; times=func(a,b){a*b}; run($(["1", "2", "3"]), times)`, nil, `operator(): missing params -- a, b`},
}
// runTestSuiteSpec(t, section, inputs, 4)
runTestSuite(t, section, inputs)