diff options
author | Přemysl Janouch <p.janouch@gmail.com> | 2017-05-20 15:46:52 +0200 |
---|---|---|
committer | Přemysl Janouch <p.janouch@gmail.com> | 2017-05-21 13:19:47 +0200 |
commit | fedde03f1e6b47784bd2b7d55247e5f2e08a6385 (patch) | |
tree | 985c94ec694567aa7bad9d175808d18151122bb8 | |
parent | 23da3966147a99ce80c52b80022f6b159ba7ded6 (diff) | |
download | ell-fedde03f1e6b47784bd2b7d55247e5f2e08a6385.tar.gz ell-fedde03f1e6b47784bd2b7d55247e5f2e08a6385.tar.xz ell-fedde03f1e6b47784bd2b7d55247e5f2e08a6385.zip |
Decided: () is our nil/undef
-rwxr-xr-x | ell.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -908,8 +908,10 @@ defn (fn_set) { if ((value = name->next)) return set (ctx, name->value, value); - // FIXME: how do we represent a nil value here? - return check (ctx, (*result = new_clone (get (ctx, name->value)))); + // We return an empty list for a nil value + if (!(value = get (ctx, name->value))) + return check (ctx, (*result = new_list (NULL))); + return check (ctx, (*result = new_clone (value))); } defn (fn_list) { |