Executes a composition.

The composition to execute.
Other arguments passed along to the composition.
Return Value
The result of the given composition.

Procs can be composed into more complex programs, called compositions. When called through core.exec, each proc in the composition is called in order, piping the output of a proc as input to the next. The entire composition is called in a single api request, making compositions quite performant.

something went wrong :(
Calling a composition
require "proc"

client = Proc.connect("PROCAUTH")
const Proc = require("");
const client = Proc.connect("PROCAUTH");
client.core.exec {
  client.type.string.reverse >> client.type.string.upcase
}.call("hello")"hello", {}, () => {
  return client.type.string.reverse.compose(
curl "" --silent \
--header "authorization: bearer $authorization" \
--header "content-type: application/vnd.proc+json" \
--header "accept: text/plain" \
--data '[[">>", ["%%", "hello"]], ["$$", "proc", ["{}", ["()", "type.string.reverse"], ["()", "type.string.upcase"]]]]'


Additional arguments given to core.exec are passed through to the composition.

Composition is a powerful part of the platform—learn how to leverage composition in your projects.


Granting access to core.exec does not automatically grant access to procs included in a composition. When creating an authorization with access to core.exec, you must explicitly list all eligible procs as abilities.

You can learn more about authorizations and how to use them in the docs.

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