pub fn run_with_fuel(source: &str, fuel: Fuel) -> Io<Error, Value>Expand description
Lex, parse, and evaluate source with a caller-supplied fuel budget.
§Errors
Same as run.
§Examples
use lambda_ref_cat::eval::Fuel;
use lambda_ref_cat::run_with_fuel;
let value = run_with_fuel(r"ref (\x. x)", Fuel::new(100)).run()?;
// The result is a fresh reference; the cell contents are not displayed.
assert!(format!("{value}").starts_with("ref("));