Post Reply 
Picking Out Elements Using a Logical List
08-17-2015, 10:56 AM (This post was last modified: 08-17-2015 11:01 AM by Didier Lachieze.)
Post: #5
RE: Picking Out Elements Using a Logical List
Nice idea to use the recursion to solve this problem. Here is a variation of your first program:
Code:
EXPORT BOOLLIST5(LA,LB)
BEGIN
  LOCAL LC:={};
  IF LB(1) THEN LC(1):=LA(1); END;
  IF SIZE(LA)==1 THEN RETURN LC; END;
  LB(0):=LB(1);
  CONCAT(LC,BOOLLIST5(tail(LA),tail(LB)));
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 - Didier Lachieze - 08-17-2015 10:56 AM



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