P()="" Local array
A Last value in P() processed i.e. P(A)="" ("" if none so far)
M Maximum number of values of A i.e. P() to process
=>
$$F(.P,A,M) = Next value in P() (or "") not processed (up to M values)
So that,
S A="" F S A=$$F(.P,A,M) Q:A="" W !,A
lists the first M values in P().
Ex.
P(3)="" and P(5)="" only
A="" , M=0 => $$F(.P,A,M) =""
A="" , M>0 => 3
A=3 , M>1 => 5
A=5 => ""
C -
Who knows of or wants a Coding Puzzles site?!?! (M, other lang,
generic?)


|