From: Robert D. <rob...@gm...> - 2025-01-01 19:27:40
|
On Wed, Jan 1, 2025 at 9:51 AM Stavros Macrakis <mac...@gm...> wrote: > (%i2) lreduce ("/", args ({a, b, c, d})); > (Not sure why it writes args ({a, b, c, d}) instead of simply [a, b, c, d] .) Haha, good catch. Trawling back through the commits shows that the example was originally lreduce( "/", set(a, b, c, d)), but at some point, early on, lreduce was changed to require the second argument to be a list. I updated the example to change the second argument to a list via args; that was about 20 years ago. How time flies! I might have said that before. I was probably trying to ensure that the result would be exactly the same, since, strictly speaking, it depends on how the set elements are ordered. Anyway the args({...}) construction is unnecessary, as noted; I'll change to just be an explicit list. Happy new year! Robert |