Open
Description
$append claims to return an array. However, as coded, if the first argument is undefined, it returns arg2 without making it an array. Try a.b.c~>$append("abc") which returns "abc" rather than ["abc"]. Likewise, "abc"~>$append(a.b.c) returns "abc" rather than ["abc"]. You can also do $append("abc",a.b.c) or $append("abc",a.b.c). $append(a.b.c,a.b.c) returns null (no match) but one could argue it should return [].
When a function claims to return an array, shouldn't the result always be an array?