Constructing and evaluating a sum
A worked sUTL example with source data, transform, expected output and runnable-original links.
sUTL · Guide · Reference · Examples
This worked example preserves its recovered source, transform and expected result. It is a static, inspectable example in Everything.
Source
[
1,
2,
3,
4
]
Transform
{
"sumtransform": [
"&&",
{
":": "&+"
},
"^@"
],
"sum": {
"!": [
"&&",
{
":": "&+"
},
"^@"
]
}
}
Expected result
{
"sumtransform": [
"&+",
1,
2,
3,
4
],
"sum": 10
}
Run it
Use the language site example or copy it into the playground. If the transform calls map_core or another library name, load the core distribution and compile its requirements; the full fixture retains that library context.
Full original fixture · Curated source record
Related reading
Paths · Quoting and evaluation · Libraries
Source
Adapted from the sUTL source material.