4 ms·
Having zero experience with this I could see myself getting used to the notation. The dot before the addition sign is strange looking to unfamiliar eyes, is it
by NegativeLatency 5y ago
Having zero experience with this I could see myself getting used to the notation. The dot before the addition sign is strange looking to unfamiliar eyes, is it calling + on the result of f.(x)?
- eigenspace 5y agoYeah that’s eighth, it’s element wise addition between the results of f.(x) and g.(y) with loop fusion. the syntax for broadcasting a regular function is f.(x) but the syntax for broadcasting an infix function like +, is x .+ y so the dot goes at the start. I think there were some convincing reasons it ended up this way, but I forget what those reasons are. It’s just muscle memory for me at this point. You can also treat any infix function as a regular prefix one by wrapping it in parens, e.g. (+).(x, y)