mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 07:41:12 +00:00
implement factorial example
This commit is contained in:
parent
f40949c64e
commit
e802da5f54
3 changed files with 51 additions and 14 deletions
|
@ -25,6 +25,9 @@ pub fn build_module<'a>(
|
|||
let mut backend = WasmBackend::new();
|
||||
let mut layout_ids = LayoutIds::default();
|
||||
|
||||
let mut procedures: std::vec::Vec<_> = procedures.into_iter().collect();
|
||||
procedures.sort_by(|a, b| b.0 .0.cmp(&a.0 .0));
|
||||
|
||||
for ((sym, layout), proc) in procedures {
|
||||
let function_index = backend.build_proc(proc, sym)?;
|
||||
if env.exposed_to_host.contains(&sym) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue