Files
compiler-explorer/examples/mojo/default.mojo
Alastair Murray d4aef5fb1e Update Mojo default example to compile with nightly and 0.26.1.0 (#8526)
Recent compilers do not allow parametric functions to be exported, so
remove the keyword. Note that this means the function now gets inlined
with default optimization levels.
2026-02-27 21:18:09 -05:00

6 lines
84 B
Mojo

fn multiply[m: Int](n: Int) -> Int:
return m * n
fn main():
_ = multiply[3](5)