Arc Forumnew | comments | leaders | submitlogin
4 points by tel 6100 days ago | link | parent

Haskell chooses this order because partial application and pointfree style are really common.

   let squareall = map (^2)
   squareall [1,2,3] ===> [1,4,9]
   squareall [3,4,5] ===> [9,16,25]
   let f = foldr1 (+) . squareall . filter even
   f [1,2,3,4,5] ===> 20
But since partial application is not a default behavior in Arc ([map square] and [map _ square] are not that different from one another) the order of the fn and list aren't as important.

Rule of thumb might be: put the fastest changing piece last, but this syntax thing might be a stronger heuristic.