type.number.build0.000001
Builds a new number.
Arguments
no defined arguments
Return Value
The given input coerced to a number, or an empty number if no input is given.something went wrong :(
Building and using a number
Setup
authorization=PROCAUTH
require "proc"
client = Proc.connect("PROCAUTH")
const Proc = require("@proc.dev/client");
const client = Proc.connect("PROCAUTH");
composition = client.type.number >> client.math.add(
42
)
composition.call
let composition = client.type.number.compose(
client.math.add(
42
)
);
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.number"], ["()", "math.add", [">>", ["%%", 42]]]]]]'
42
Like all value builders type.number.build
is callable through the root type.number
proc.
Stuck? Want to chat about an idea? Join the community on Discord.