(lib: &mut StandardLibrary<'_, 'heap>)
| 20 | } |
| 21 | |
| 22 | fn define(lib: &mut StandardLibrary<'_, 'heap>) -> ModuleDef<'heap> { |
| 23 | let mut def = ModuleDef::new(); |
| 24 | let heap = lib.heap; |
| 25 | |
| 26 | let graph = lib.manifest::<std_lib::graph::Graph>(); |
| 27 | |
| 28 | let mut graph_ty = graph.expect_type(heap.intern_symbol("Graph")); |
| 29 | graph_ty.instantiate(&mut lib.instantiate); |
| 30 | |
| 31 | // `collect<T>(graph: Graph<T>) -> List<T>;` |
| 32 | let decl = decl!(lib; |
| 33 | <T>(graph: lib.ty.apply([(graph_ty.arguments[0].id, T)], graph_ty.id)) -> lib.ty.list(T) |
| 34 | ); |
| 35 | |
| 36 | func(lib, &mut def, "::graph::tail::collect", &[], decl); |
| 37 | |
| 38 | def |
| 39 | } |
| 40 | } |
nothing calls this directly
no test coverage detected