05-19-2021, 04:34 AM
OK, on checking that did solve the heap space requirement, but I had some other logic errors. However when I corrected them, I get no result.
I suspect this is due to:
(sites) and/or (results) probably is returning -1 when there are no values in (values Remembered) in (results from:(sites (values Remembered ...) ...) ...)
so following that, the (union) implementation goes to an error state?
- does it do so if any of the inputs is empty/error, or only if all of the inputs are empty/error?
So:
(forEach Value (union ...<is in error as above>...) (remember Value "S4" (value))
presumably just doesn't execute the (remember) -- but does it stop the (then in:
(if (<condition>) (<error result>) (then ....)) from executing as well? (i.e. do I need to encapsulate in a series of do (if (...) (...)) next:(do...), instead of (if (...) (...) (then...) ? ) Edit: I made that change now just in case.
My understanding of what (union) should do is that, like an logical (or), it should ignore the empty/error arrays unless ALL of them are empty/error, but the lack of results makes me suspect that it is returning -1 if any of the inputs is -1. -- Or else that the subsequent (then)s are not executing, or both.
If this is the case, can you fix it, or provide an option on union to ignore invalid arrays? -- It will be hard to script individually hiding empty arrays from the union function.
If I add dummy values to guarantee existence or the remembered values, then I would need to script exemptions for each of the from: lines - and it would only help if it is (sites) that is throwing up the invalid flag.
Attached is a version that shows this problem. The destinations are neither remembered not assigned to pending. This happened when I switched the ">" to "<" in the find destination define, causing some of the remembered arrays to be empty. I later made other adjustments, but the problem still is no destinations get assigned. (click on an empty cell next to 2 pieces, or on a piece itself to verify this.
I suspect this is due to:
(sites) and/or (results) probably is returning -1 when there are no values in (values Remembered) in (results from:(sites (values Remembered ...) ...) ...)
so following that, the (union) implementation goes to an error state?
- does it do so if any of the inputs is empty/error, or only if all of the inputs are empty/error?
So:
(forEach Value (union ...<is in error as above>...) (remember Value "S4" (value))
presumably just doesn't execute the (remember) -- but does it stop the (then in:
(if (<condition>) (<error result>) (then ....)) from executing as well? (i.e. do I need to encapsulate in a series of do (if (...) (...)) next:(do...), instead of (if (...) (...) (then...) ? ) Edit: I made that change now just in case.
My understanding of what (union) should do is that, like an logical (or), it should ignore the empty/error arrays unless ALL of them are empty/error, but the lack of results makes me suspect that it is returning -1 if any of the inputs is -1. -- Or else that the subsequent (then)s are not executing, or both.
If this is the case, can you fix it, or provide an option on union to ignore invalid arrays? -- It will be hard to script individually hiding empty arrays from the union function.
If I add dummy values to guarantee existence or the remembered values, then I would need to script exemptions for each of the from: lines - and it would only help if it is (sites) that is throwing up the invalid flag.
Attached is a version that shows this problem. The destinations are neither remembered not assigned to pending. This happened when I switched the ">" to "<" in the find destination define, causing some of the remembered arrays to be empty. I later made other adjustments, but the problem still is no destinations get assigned. (click on an empty cell next to 2 pieces, or on a piece itself to verify this.