type.array.build
0.000001

Builds a new array.

Arguments
no defined arguments
Return Value
The given input coerced to an array, or an empty array if no input is given.
something went wrong :(
Building and using an array
Setup
authorization=PROCAUTH
require "proc"

client = Proc.connect("PROCAUTH")
const Proc = require("@proc.dev/client");
const client = Proc.connect("PROCAUTH");
composition = client.type.array >> client.type.array.append(
  "foo"
)

composition.call
let composition = client.type.array.compose(
  client.type.array.append(
    "foo"
  )
);

composition.call();
curl "https://proc.run/core/exec" --silent \
--header "authorization: bearer $authorization" \
--header "content-type: application/vnd.proc+json" \
--header "accept: text/plain" \
--data '[["$$", "proc", ["{}", ["()", "type.array"], ["()", "type.array.append", [">>", ["%%", "foo"]]]]]]'
 

["foo"]

Like all value builders type.array.build is callable through the root type.array proc.


Stuck? Want to chat about an idea? Join the community on Discord.