Alex Rivera | Logout

What is a function that takes no arguments called?

Asked 2011-04-27T15:01:32.950
23

Is there a term that describes a function that takes no arguments more concisely than "function that takes no arguments"? (In the same way that e.g. "higher order function" means "function that takes functions as arguments or returns a function")

I naturally think of "void", but I also think of side effects when I see "void". The situation I'm thinking of is the sort found in this discussion of constantly:

What is this functional "pattern" called?

where you might create a closure that takes no arguments, has no side effects, but still does something interesting.

Edit
Report

1 Answer

8

A nullary or niladic function.

    

answered 2011-04-27T15:04:05.310

Your Answer