Skip to main content
14 events
when toggle format what by license comment
Nov 27, 2012 at 8:49 vote accept snakehiss
Nov 24, 2012 at 21:11 comment added Jimmy Hoffa @TikhonJelvis cool! I'll have to dig into ocaml!
Nov 24, 2012 at 20:52 comment added Tikhon Jelvis @JimmyHoffa: I don't know about SML, but I've used OCaml, which is similar, and it does support currying almost as ubiquitously as Haskell. However, the coding style seems different: in Haskell, almost every function you write is curried; in OCaml, people often write functions that take a tuple (e.g. uncurried). Things like int * int -> int as opposed to int -> int -> int. I think this is only a matter of code style though.
Nov 24, 2012 at 9:55 comment added Giorgio @Jimmy Hoffa: As I pointed out, I think Scala's support for currying it not the default and not as flexible as Haskell's: in Scala you have to indicate in the signature at which point you want to cut your function, like: def f(x: Int)(y: Int): Int (with currying) vs def f(x: Int, y: Int): Int (no currying).
Nov 23, 2012 at 23:50 comment added Jimmy Hoffa @Ubiquité Is it default behaviour in the ML family? I've been meaning to play with SML, I meddled with F# a bit but didn't notice if currying was default behaviour in it
Nov 23, 2012 at 23:48 history edited Jimmy Hoffa CC BY-SA 3.0
edited body
Nov 23, 2012 at 23:43 history edited Jimmy Hoffa CC BY-SA 3.0
added 396 characters in body
Nov 23, 2012 at 23:39 comment added BenjaminB The whole ML familly support currying.
Nov 23, 2012 at 23:32 history edited Jimmy Hoffa CC BY-SA 3.0
added 1350 characters in body
Nov 23, 2012 at 23:24 comment added Jimmy Hoffa @Giorgio I know there's a myriad of languages which support it, though I'm not aware of languages which have it as default behaviour other than Haskell derivatives, either way that's a side note, I was just using Haskell to illustrate it, there are articles which show it can be done in any language which has higher order functions
Nov 23, 2012 at 23:22 history edited Jimmy Hoffa CC BY-SA 3.0
added 1350 characters in body
Nov 23, 2012 at 23:14 history edited Jimmy Hoffa CC BY-SA 3.0
added 1350 characters in body
Nov 23, 2012 at 23:13 comment added Giorgio Scala also supports currying but, AFAIK, not as flexibly as Haskell.
Nov 23, 2012 at 23:06 history answered Jimmy Hoffa CC BY-SA 3.0