aboutsummaryrefslogtreecommitdiff
path: root/examples/uniq.fwd
diff options
context:
space:
mode:
Diffstat (limited to 'examples/uniq.fwd')
-rw-r--r--examples/uniq.fwd6
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/uniq.fwd b/examples/uniq.fwd
index c1edc1b..cc6e0af 100644
--- a/examples/uniq.fwd
+++ b/examples/uniq.fwd
@@ -10,11 +10,17 @@ fwd_some(optional![string] o,
fwd_insert(unordered_set![string] set, string line,
(unordered_set![string]) next);
+fwd_destroy(auto a);
+
/* at some point I'll probably add in a type system as well, but for now let's
* pretend we're static-dynamic (or dynamic at compiletime? dunno) */
readlines(unordered_set![string] set, (unordered_set![string]) next)
{
fwd_getline() => optional![string] line;
+ !> e {
+ own set {fwd_destroy(set);}
+ error e
+ }
fwd_some(line) => string line {
/* we had something in our option */