From 989db3dc103fe7b35c0415fe56cb661313095ef3 Mon Sep 17 00:00:00 2001 From: darkf Date: Wed, 28 May 2014 18:39:46 -0700 Subject: [PATCH] examples: update association_list --- examples/association_list.lamb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/association_list.lamb b/examples/association_list.lamb index d0cc889..f19cbdc 100644 --- a/examples/association_list.lamb +++ b/examples/association_list.lamb @@ -2,7 +2,7 @@ map_insert(assoc, pair) -> pair :: assoc. -- lookup by key -map_lookup([], _) -> ("nothing"). +map_lookup([], _) -> ("nothing",). map_lookup((k,v)::xs, key) -> if k == key then ("just", v) else map_lookup(xs, key). @@ -21,5 +21,5 @@ m = map_insert(m, ("ready", "go")). print(m). print(map_remove(m, "k")). ("just", x) = map_lookup(m, "hi"). -("nothing") = map_lookup(m, "foo"). +("nothing",) = map_lookup(m, "foo"). print(x). \ No newline at end of file