New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Have <, > and others take 0 or more arguments #53
Comments
This would definitely conflict with pushing racket2 in the infix direction, where these functions would likely become binary infix operators instead of variable-arity functions. |
Adding a 0-argument case wouldn't increase the conflict, given that that they already take 1 or more. There ought to be a non-infix way to use operators like |
Should the variable-arity way use the same names? I personally don't think so, because (to non-racketeers) the symbols are so strongly associated with their infix notation. And that way I wouldn't have to deal with the confusion of reading prefix |
For one order I was choosing names for recently, I tried the naming convention For the ordering of real numbers, I usually put my expressions in the order of the number line, so I almost always prefer Nevertheless, I do internally pronounce So orderings are one place I would find it much more readable to have expressions like I think I've heard of people implementing this |
Also
|
<
,>
and others take0
or more arguments (returning#t
for the0
and1
argument cases). This would allow applying them to lists without fear, which would allow patterns like(define (sorted? l) (apply < l))
Extracted from the old racket2 wiki. #33
I think this can be merged to racket1.
The text was updated successfully, but these errors were encountered: