
David Roundy wrote:
This style supports multiple operations nicely, especially with combined with the $ operator. For example, to insert 3 elements into a set, you can say insert 1 $ insert 2 $ insert 3 $ someSet (the last $ is optional). With the other argument ordering, you would say insert (insert (insert someSet 3) 2) 1
With this ordering, couldn't one simply write
someSet `insert` 3 `insert` 2 `insert` 1
?
Sure, although I'll admit that I have an aversion to the backquote style of infix operators. The bigger problem with this style is what to do about non-binary operations. For example, insert for a dictionary takes three arguments. So you could write insert 1 a $ insert 2 b $ insert 3 c dict but not dict `insert` 1 a `insert` 2 b `insert' 3 c Of course, you could potentially package some arguments in a tuple dict `insert` (1,a) `insert` (2,b) `insert` (3,c) but having some arguments in tuples has its own problems. -- Chris