diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib.c | 3 |
2 files changed, 8 insertions, 0 deletions
@@ -1,5 +1,10 @@ 2009-11-20 Kaz Kylheku <kkylheku@gmail.com> + * lib.c (flatten): Semantics change. The flatten function + should not map nil -> (nil), but nil -> nil. + +2009-11-20 Kaz Kylheku <kkylheku@gmail.com> + Changing ``obj_t *'' occurences to a ``val'' typedef. (Ideally, we wouldn't have to declare object variables at all, so why use an obtuse syntax to do so?) @@ -397,6 +397,9 @@ val none_satisfy(val list, val pred, val key) val flatten(val list) { + if (list == nil) + return nil; + if (atom(list)) return cons(list, nil); |