aboutsummaryrefslogtreecommitdiff
path: root/examples/uniq.fwd
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2025-03-18 18:37:00 +0200
committerKimplul <kimi.h.kuparinen@gmail.com>2025-03-18 18:37:00 +0200
commit3d7713b5af2e1229949b31dcce74c7aba1fe042a (patch)
treebe308e9a60ff129d699ac6b515b81c66576e57d9 /examples/uniq.fwd
parent17c7dbd9cec96862384c4323a0e36eb0558b580d (diff)
downloadfwd-3d7713b5af2e1229949b31dcce74c7aba1fe042a.tar.gz
fwd-3d7713b5af2e1229949b31dcce74c7aba1fe042a.zip
add move queues
+ Returning blocks don't want to show moves for subsequent statements, but do want to show them for possible closure callers above.
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 */