|
|
|
|
|
by nothrabannosir
2989 days ago
|
|
Minor note: > A = { n^2 : n = 1, 2, …, 100 } > In Python, or interpreting the expression literally, the value of n would be a tuple, producing a type error. (In Javascript, it produces 2.[link] How could it be Javascript if it didn’t?) That linked JS code uses ^, which is xor, not pow. Math.pow([], 2) = NaN. Or maybe that was the joke and it flew completely over my head. |
|
See, for example, https://www.destroyallsoftware.com/talks/wat