Niladic: Difference between revisions

From NARS2000
Jump to navigationJump to search
No edit summary
No edit summary
Line 2: Line 2:


<code>'''<big>&nbsp;&nbsp;&nbsp;&nbsp;∇ z{:=}dealcard<br/>
<code>'''<big>&nbsp;&nbsp;&nbsp;&nbsp;∇ z{:=}dealcard<br/>
[1]&nbsp;&nbsp;&nbsp;&nbsp;z←1 ? 52<br/>
[1]&nbsp;&nbsp;&nbsp;&nbsp;z←? 52<br/>
&nbsp;&nbsp;&nbsp;&nbsp;∇ </big>'''</code>
&nbsp;&nbsp;&nbsp;&nbsp;∇ </big>'''</code>



Revision as of 20:57, 27 February 2013

A function is niladic if it does not accept any arguments. For example:

    ∇ z←dealcard
[1]    z←? 52
    ∇

This function would return a random number in the range 1 - 52, but it would not accept any argument, such as would be used for dealing a card in a game.

See Also