Prism · Core

$with

Names values once for use further down. What let binds is read with $var, and only inside value.

The source
{}
The config
{
  $with: {
    let: { a: { $const: 10 }, b: { $const: 32 } },
    value: { $add: [{ $var: 'a' }, { $var: 'b' }] },
  },
}
What comes out
42
Output matches the expected value

Runs in this page on the installed package. The input and the expected output are defined by the example.