pipa-lang 1.0.0-alpha.1

A tiny template language
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// SPDX-FileCopyrightText: Copyright 2026 olav@occy.org
// SPDX-License-Identifier: MPL-2.0

use crate::func::math::math_binary_facade;
use crate::lang::adapter::Adapter;
use crate::lang::error::Error;
use crate::lang::machine::Machine;
use crate::lang::node::Node;
use crate::value::Value;

pub(crate) fn sub(
    adapter: &impl Adapter,
    machine: &mut Machine<'_>,
    stdin: Option<&Value>,
    node: Node,
) -> Result<Value, Error> {
    math_binary_facade(adapter, machine, stdin, node, |a, b| a - b)
}