I've just found filter (which looks like find ALL) whilst reading up on find so....thank you very much both for the question and answer.
On 25 January 2017 at 07:03, Alexander Burger <[email protected]> wrote: > Hi Joe, > > > (de account-list > > ("Bank Charge"."Expenses:Bank Fee") # matches if in > last position > > ("City Market"."Expenses:Groceries") # ONLY this line works to > match > > ) > > (de determine-acct (desc) > > (for x account-list # go through account list > > (when (sub? (car x) desc) > > (cdr x)))) # on match > return expense category > > The problem is that the loops does not exit upon a match. > > You could either do > > (de determine-acct (Desc) > (for X account-list > (T (sub? (car X) Desc) > (cdr X) ) ) ) > > or use 'find' > > (de determine-acct (Desc) > (find > '((X) (sub? (car X) Desc)) > account-list ) ) > > ♪♫ Alex > -- > UNSUBSCRIBE: mailto:[email protected]?subject=Unsubscribe >
