🕸📝Fergus Duniho wrote on Wed, May 29, 2024 07:31 PM UTC:
I just made a modification to unless, because it was returning 1 for "a unless true" instead of nothing like "a onlyif false" would. The reason for this is that in each case, it was returning the first value after unless or onlyif, but onlyif was returning it if false, and unless was returning it if true. So, I have changed unless to return false when it has a single true argument. This allows something like "print a unless true" to work as expected and print nothing.
I just made a modification to unless, because it was returning 1 for "a unless true" instead of nothing like "a onlyif false" would. The reason for this is that in each case, it was returning the first value after unless or onlyif, but onlyif was returning it if false, and unless was returning it if true. So, I have changed unless to return false when it has a single true argument. This allows something like "print a unless true" to work as expected and print nothing.