Programming puzzles: processing lists!
11-05-2017, 10:04 PM (This post was last modified: 11-10-2017 10:57 PM by StephenG1CMZ.)
Post: #226
 StephenG1CMZ Senior Member Posts: 901 Joined: May 2015
RE: Programming puzzles: processing lists!
I have implemented #32 multiple GET on the Prime.

Code:
  EXPORT GETLST(LST,GETLST)  //Solves Puzzle #32. POSN≥0.  BEGIN  LOCAL II;   IF SIZE(GETLST) THEN    RETURN MAKELIST(LST(GETLST(II)),II,1,SIZE(GETLST));   END;   RETURN {};//ASKED TO GET NOTHING  END;
Update: As typed here, the procedure name and parameter name are the same.
I'd suggest they shouldn't be, to minimise the risk of SIZE() measuring the wrong one.

(A version with error checking is in my List API: ListGETLIST