Examples · learn/25-js-interop · 281 of 339
tool.fails
tin run examples/learn/25-js-interop/tool.fails.tinimport js "./shapes.mjs"
extern fn hypot(a: float, b: float): float
/// The length of a vector.
tool fn length(x: float, y: float): float => hypot(x, y)
agent Geometer { model: "mock", tools: [length] }
fn main() {
print(Geometer("length 3 4"))
}