Find first missing positive: Difference between revisions

m
Line 436:
=={{header|J}}==
The first missing positive can be no larger than 1 plus the length of the list.
 
Note that the <nowiki>{{ }}</nowiki> delimiters on definitions was introduced in J version 9.2
 
<lang J>fmp=: {{ {.y-.~1+i.1+#y }}S:0</lang>
6,962

edits