Gaussian primes: Difference between revisions

Content added Content deleted
(→‎{{header|jq}}: simplify)
(→‎{{header|jq}}: document an assumption)
Line 220: Line 220:
end;
end;


# Given a stream of values, group by the values of `x|filter` that occur in a run.
# Given a stream of non-null values,
# group by the values of `x|filter` that occur in a run.
def runs(stream; filter):
def runs(stream; filter):
foreach (stream, null) as $x ({emit: false, array: []};
foreach (stream, null) as $x ({emit: false, array: []};