Files
mgmt/lang/interpret_test/TestAstFunc2/map-iterator2/main.mcl
James Shubin 75d4d767c6 lang: funcs: core: iter: Add map iterator function part2
This adds the Unify method to our map function and also switches the arg
order because I decided it would look nicer. Completely untested.
2022-08-04 14:24:05 -04:00

14 lines
173 B
Plaintext

import "iter"
$fn = func($x) { # ignore arg
42
}
$in = [5, 4, 3, 2, 1,]
$out = iter.xmap($in, $fn) # XXX: change to map
$t = template("out: {{ . }}", $out)
test $t {}