I'm surprised that (pick '((A B) (and (= A Value) B)) ListA ListB) is
faster than (get ListB (index Value ListA)).
It's true that get traverses ListB right after a traversal of ListA, but
pick seems to do the same traversal of
the same number of elements. The only difference is that pick traverses the
two lists at the same time, instead
Why is pick faster?
How's it going? Did you get what you wanted?
On Tue, Dec 13, 2016 at 3:39 PM, dean <deangwillia...@gmail.com> wrote:
> Hi Alex
> I changed those 'Key 'Keys and 'Fn_to_call shortly after posting.
> There'll also be a 3rd list call 'Args.
> Because there are numerous associated bits and pieces they seem a good
> candidate for an object.
> Thank you for "pick" and the above corrections.
> Best Regards
> On 13 December 2016 at 19:58, Alexander Burger <a...@software-lab.de>
>> Hi Dean,
>> > (setq I '(() (a) (a b)))
>> > (setq V '(empty a_vlu ab_vlu))
>> > (de vlu4key (K 'I 'V)
>> This is fatal! A function needs a list of *symbols*, not expressions like
>> 'I ;)
>> > > (de vlu4key (Vlu 'I 'V)
>> > > (setq Ix (index Vlu I))
>> > > (get V Ix) )
>> Using 'index' to find an element and then traverse the list again with
>> 'get' is
>> not efficient.
>> Instead, I recommend 'pick' where you pass the two lists.
>> - Alex
>> UNSUBSCRIBE: mailto:firstname.lastname@example.org?subject=Unsubscribe