Is it possible to define a nullary function in J?  In other languages they're sometimes convenient, for example a function that returns a random element.  It's a bit awkward to have to use a dummy argument, like

randdie =: 1 + ? @: 6:

which must be called like

randdie 0

and when used in a tacit definition must be called like

randdie ].



----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to