aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2017-05-25 13:49:32 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2017-05-25 13:49:32 +0200
commit1f71c5202c3573871f9c37df26d62bd9ed255c0b (patch)
tree438f095abe3f3f9ace299b60cf5d815b575ebc42
parentfebefc6c6d58a28025e4ac96fa173d52938f3e2e (diff)
downloadell-1f71c5202c3573871f9c37df26d62bd9ed255c0b.tar.gz
ell-1f71c5202c3573871f9c37df26d62bd9ed255c0b.tar.xz
ell-1f71c5202c3573871f9c37df26d62bd9ed255c0b.zip
Make setting "set" also return the value
-rw-r--r--ell.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ell.c b/ell.c
index 101b59e..a73d0a4 100644
--- a/ell.c
+++ b/ell.c
@@ -898,6 +898,7 @@ defn (fn_set) {
struct item *value;
if ((value = name->next))
return check (ctx, (value = new_clone (value)))
+ && check (ctx, (*result = new_clone (value)))
&& set (ctx, name->value, value);
// We return an empty list for a nil value