pub fn run_with_fuel(source: &str, fuel: Fuel) -> Io<Error, Value>Expand description
Lex, parse, and evaluate source against the empty environment with a
caller-supplied Fuel budget.
§Errors
Any of the underlying passes can fail; see Error.
§Examples
use lambda_cat::eval::Fuel;
use lambda_cat::run_with_fuel;
let value = run_with_fuel(r"(\x. x) (\y. y)", Fuel::new(100)).run()?;
assert_eq!(format!("{value}"), "\\y. y");