
19 Aug
2005
19 Aug
'05
11:13 a.m.
On Fri, Aug 19, 2005 at 09:39:38AM -0400, Okasaki, C. DR EECS wrote:
In response to questions about why the convention of putting the data structure as the last argument...
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 ? -- David Roundy http://www.darcs.net