array package:yaml

Construct a new Value from a list of Values.
A JSON "array" (sequence).
withArray expected f value applies f to the Array when value is an Array and fails otherwise.

Error message example

withArray "MyType" f (String "oops")
-- Error: "parsing MyType failed, expected Array, but encountered String"