3 ms·
Yeah 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
by eigenspace 5y ago
Yeah 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)