Make setting "set" also return the value

This commit is contained in:
Přemysl Eric Janouch 2017-05-25 13:49:32 +02:00
parent febefc6c6d
commit 1f71c5202c
Signed by: p
GPG Key ID: B715679E3A361BE6
1 changed files with 1 additions and 0 deletions

1
ell.c
View File

@ -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