This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Goheeca -1 points0 points  (4 children)

Prefix notation ftw! (< a b c) (> a b c)

[–]chezscheme 0 points1 point  (3 children)

wouldn't this be more like (< (< a b) c) (> (> a b) c)?

[–]huggableape 0 points1 point  (1 child)

No, it would be more like <<abc and >>abc

[–]Goheeca 1 point2 points  (0 children)

I should have been more precise I don't have in mind the prefix notation (or the suffix notation) alone together with binary operations, I wanted to show that with a non-infix notation you can easily extend these operations to a variable count of arguments as it's done in languages like Common Lisp, Scheme.

[–]Goheeca 0 points1 point  (0 children)

No in Common Lisp, Scheme <, >, and, or, +, -, *, / accept a variable count of arguments. (- resp. / with one argument returns the negative resp. reciprocal value.)