Hacker News new | ask | show | jobs
by eru 3353 days ago
OCaml doesn't have argumentless functions.. But they do have functions that take a 'unit' argument.
1 comments

I know, I've asked about this:

>The way argumentless functions must be declared with "function".

function is just a sugar for fun+match, what does it have to do with argumentlessness?

I think by "argumentless function" OP just means "a function taking a single, unnamed argument", which is what function does as opposed to fun in OCaml (As you say, function is just sugar for (fun arg -> match arg with .... ) - it's a common enough idiom to have some sugar in the syntax).