this is ok:
this is not working:
why? Is it a bug?
all of is predicate input special form
it expects a ring in each of the inputs
if you use its inputs it gives you rings
if you dont it can do anything to that
no you dont
@bh pls make it so that if the inputs are not of type predicate then treat them as booleans(in library,the inputs are fine)
No, pit tje rings around the inputs.
No, around each list item.
oh, like this...
That's right.
Oh, that's interesting. I guess I'll accept that as a bug in the library, which I should fix.
Booleans are a little weird because they work both as niladic functions and as self-quoting constants. If they were just functions I'd say no, not a bug, you shouldn't expect that to work. But in your example they're clearly intended as constants. And it's possible to catch this case in the library procedure.
Just yesterday we had a meeting at which my colleague Prof. Dan Garcia asked for variadic AND and OR. Jens started out saying that wasn't possible because they're lazy. (If the first input determines the result, the second input isn't evaluated.) But Dan convinced him that lazy variadic inputs are possible to implement and so he's considering it. And if we actually do that, the library functions will be unnecessary, so this may become a moot point.
What you really want is for the LIST block, when used in a lazy variadic input slot, to "inherit" the laziness with respect to its own inputs. That would be an elegant solution for these two functions, but I can't think of any other use cases offhand, and it'd be a horrible kludge to implement, so I'm guessing we're not going to do that.
thank you
Maybe
or allow call to be used with a constant.
one extra ring
Rather two... as item(1) may already be a ring expression
ah right i only spot call(ring(x)) without further inspection
I tried to fix it within the and
implementation scripts, with a more 'general' solution than @dardoro 's, but to no avail (every time I thought I had solved it something else went wrong). Did these functions work universally before Snap! 8.1?
Maybe post Your test cases.