I'm bored as fuck at work implementing fizzbuzz in fish in Termux on my phone. I learned a while ago that I could run curl on a whole list of webpages that were numbered by putting (seq $firstpage $lastpage) in place of the page number in the URL, frustratingly fish's math does not work the same way.

curl https://example.org/(seq 1 3)/ is equivalent to curl https://example.org/1/ ; curl https://example.org/2/ ; curl https://example.org/3/. math (seq 1 3) % 2 is equivalent to math 1 2 3 % 2, which does not work & is also not the equation I want!

why did it do that :(
I was using set wrong.
That didn't seem to be the cause of this issue. I don't know what was but renaming variables fixed it for some reason. Maybe I misspelled one. Now the issue is that math doesn't like the character immediately after the operator when run in the subshell from xargs, whether or not it's a space or an operand, it dislikes it & says it's an unexpected token (it's not unexpected, that's how the documentation says to use it).
It was a misspelled variable againđź’”
Now contains exits 1 for all numbers, even though, for 1 to 10, 4, 6, 8, 9, & 10 should exit 0. This causes if to always choose the else case. I don't know what's going on.
I read the manual for contains wrong & had the arguments backwardsđź’”
Now it works & I can make it faster by making it use more threads for calculating more moduli at once, since their order in the list does not matter.
This could be much faster if I could get xargs to immediately stop adding new moduli to the list once it finds one equal to zero, but I have no idea how to do that. I could theoretically speed it up by shuffling the numbers used to calculate moduli instead of doing them in order, but it would be as theoretically faster as bogosort; instead it might be faster to order the "modulators" by which ones are factors of other numbers most commonly, but I think that's the same as numerical order. I could speed this up even more by reimplementing it in assembly. I will not be implementing anything in assembly.
xargs exits immediately when any exit code is 255, because it believes it's an error. This could be abused to do what I want, but it seems like it would cause other issues, such as potentially not adding that zero to the list. Abusing xargs errors would change the logic I need to detect a composite number from searching for zeros to reading the exit code from xargs. I also don't know the behavior of if or for when errors are involved, & xargs exits 124 when it receives exit 255 from one of its children, so it does not shield the loop from errors.