3 ms·
In Response to “Euler's FizzBuzz”
- thyrsus 5y agoWhat is the meaning of "|" in this context? It doesn't seem to be "or" or "such that", which is what I'm accustomed to. It would be hilarious if the variables were processes sending stdout to stdin :-) but such an extraordinary claim would need extraordinary evidence >;-) Edit: I'm referring to the instances where it appears by itself, not where it occurs in a pair surrounding a term, and means "size of".
- vitus 5y agoDivides. https://mathworld.wolfram.com/Divides.html https://mathworld.wolfram.com/Divides.html
- tantalor 5y agoThe original: http://philcrissman.net/posts/eulers-fizzbuzz/ http://philcrissman.net/posts/eulers-fizzbuzz/ I find this part inscrutable: > It is possible to write a function which uses no conditional logic at all And then goes on to show several examples in python, ruby, and mathematical syntax using condition logic. I mean, just moving the conditions into a lookup table does make it "not conditional". These programs both use conditional logic: for x in range(10): print(x, 'is', 'odd' if x % 2 else 'even') for x in range(10): print(x, 'is', ('even', 'odd')[x % 2])
- deleted 5y ago[deleted]
- setr 5y agoAccording to the cpu, you won't have any branching with a LUT -- so you can pipeline everything nicely So at least from that perspective, you've eliminated the impact of the condition