#include "std/mem.toc", mem; #include "tests/std/io.toc", io; use mem; sum_slice ::= fn(a : &[]int) total := 0 { for i := 0..a.len-1 { total += a[i]; } } thing ::= fn() int { bar : []int; defer dels(bar); bar = news(int, 3); b := sum_slice(&bar); b } main ::= fn() { a := thing(); b ::= thing(); io.puti(a); io.puti(b); }