Hacker News new | ask | show | jobs
by hyperion2010 2529 days ago
Racket currently has something like this for certain operators. `. -> . ` will allow the arrow to sit in between inputs and outputs in contracts.
2 comments

> for certain operators

AFAIK it works for any operator that takes two operands (or more, but it makes less sense to be using it with three or more operands.)

e.g:

    > '(arg0 . operator . arg1 arg2)
    '(operator arg0 arg1 arg2)
Ah, interesting—thanks for pointing that out. That is practically the same thing. I only wonder if the fact that it's two dots tends to discourage it from general use for things like arithmetic, compared to a single character.