3 ms·
This is likely borrowed from Haskell where functions starting with special characters are treated as infix. Parens and backticks allow for switching between the
by tmerr 9y ago
This is likely borrowed from Haskell where functions starting with special characters are treated as infix. Parens and backticks allow for switching between the conventions
add a b = a + b
-- these are all the same
3 + 4
(+) 3 4
add 3 4
3 `add` 4
The article might also make slightly more sense in context, I think it was in part an idea for how to make infix notation more useful in Kitten: https://github.com/evincarofautumn/kitten/issues/174 https://github.com/evincarofautumn/kitten/issues/174
- ghusbands 9y agoTo some extent, yes, but the article silently switches the meaning of + about halfway through. That's why there's confusion.