News for hackers. Stuff that matters.
Re:What is the advantage of currying? by michaelfeathers on Saturday February 02, 2013 @09:55AM (#5156093)
I guess there are no guarantees. Which ones are you thinking of in Haskell? There it seems to matter more.
Re:What is the advantage of currying? by guard-of-terra on Saturday February 02, 2013 @11:19AM (#5156340)
I always seem to struggle with array/list indexing functions.
Re:What is the advantage of currying? by crntaylor on Saturday February 02, 2013 @12:49PM (#5156675)
Like these?

  > let lst = [1,2,3]
  > lst!!0
  1
  > lst!!1
  2
  > let arr = listArray (0,2) [1,2,3]
  > arr!0
  1
  > arr!2
  2
I don't see how it would be particularly helpful to have the arguments to the indexing functions the other way around, but in case you really like the index coming before the list/array, you can always do

  > (!0) arr
  1
  > (!!1) lst
  2