def job.fields

snap@1.4.0.0 · src/par.bend:8

import snap@1.4.0.0/src/par.bend as Par
import Base

8# one job's fields on the `par` wire: each argument marked with a `+` in
9# front, then an empty field that ends the job. A marked field is never empty,
10# so the empty one cannot be mistaken for an argument, whatever the arguments
11# hold; and the empty job is the empty field alone.
12def job.fields(argv: List<&2, String>) -> List<&2, String>:
13  match argv:
14    case []:
15      [""]
16    case arg <> rest:
17      ("+" ++ arg) <> job.fields(rest)

Uses (3)

Used by (1)