However, this is not enforced in all combinations. Example:
# Array input, function returns array, behaves as expected:
$ ./jsonnet -e 'std.flatMap(function(x) [x], ["a", "b", "c"])'
[
"a",
"b",
"c"
]
# Array input, function returns a string, behaves strangely:
$ ./jsonnet -e 'std.flatMap(function(x) x, ["a", "b", "c"])'
"[ ]abc"