Post Reply 
Picking Out Elements Using a Logical List
08-16-2015, 11:40 PM
Post: #4
RE: Picking Out Elements Using a Logical List
And another version using no declared variables and no for loop:

Code:
export BOOLLIST4(LA,LB)
BEGIN
 IF LB(1) THEN 
  IF size(LA)==1 THEN return LA(1);end;
  return concat(LA(1),BOOLLIST4(SUB(LA,2,size(LA)),CONCAT(SUB(LB,2,SIZE(LB)),LB(1)))​);
 end;
 if size(LA)==1 then return {};end;
 BOOLLIST4(SUB(LA,2,size(LA)),CONCAT(SUB(LB,2,SIZE(LB)),LB(1)));
END;
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Picking Out Elements Using a Logical List - roadrunner - 08-16-2015 11:40 PM



User(s) browsing this thread: 1 Guest(s)