Stair-climbing puzzle: Difference between revisions

m
Line 502:
 
step_up=: (] , attemptClimb)^:isNotUpOne^:_</lang>
Note that <code>0:</code> is not a number but a verb (function) that returns the number zero irrespective of its argument(s). And, arguably, infinity is not any specific number. Therefore the above solution for <code>step_up</code> meets the restrictions of no variables or numbers.
 
J's verbs (functions) always take an argument. J programmers use verbs which ignore their arguments (e.g. <code>step</code> and <code>attemptClimb</code>) to replace verbs which do not take an argument.
6,951

edits