✓
Passing This code compiles and runs correctly.
Code
import std/io
import std/table
// Pin #1: generator-only comprehension -> const table, verified by its sum.
// `1..4` (upper-exclusive) = [1, 2, 3]; sum = 6.
from(nums) { x over 1..4 }
sum(total) { nums }
std/io:print.ln("{{ total:d }}")
Actual
6
Expected output
6
Flows
flow ~from click a branch to expand · @labels scroll to their anchor
from (nums, source: x over 1..4)
flow ~sum click a branch to expand · @labels scroll to their anchor
sum (total, source: nums)
flow ~print.ln click a branch to expand · @labels scroll to their anchor
print.ln (expr: "{{ total:d }}")
Test Configuration
MUST_RUN