core.pipe
0.000000

Pipes a composition result.

Arguments
procrequired
The composition to execute.
**
Other arguments passed along to the composition.
Return Value
The result of the given composition.
something went wrong :(
Piping a result to another proc
Setup
authorization=PROCAUTH
require "proc"

client = Proc.connect("PROCAUTH")
const Proc = require("@proc.dev/client");
const client = Proc.connect("PROCAUTH");
client.core.pipe {
  client.type.string.reverse >> client.type.string.upcase
}.call("hello")
client.core.pipe.call("hello", {}, () => {
  return client.type.string.reverse.compose(
    client.type.string.upcase
  );
});
curl "https://proc.run/core/pipe" --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"]]]]'
 

OLLEH

Note that the semantics of core.pipe mirror how values are normally passed through compositions.


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