Okay, my choTask looks like this now - as you can see, I assigned a list
to @Names and then assigned the 'car' of the list to @Key. The way I
avoided repetition was by assigning to a global symbol '*Names' - is that
reasonable?

         ....
         "Tags" (gui 'tags '(+Var +ListTextField) '*Tags '("," " ") 20 )
         (searchButton '(init> (: home query))) )
      (gui 'query '(+QueryChart) *ROWS
         '(goal
            '( @Names (setq *Names (filter prog (mapcar '((X) (uppc (pack
X))) *Tags) ) )
               @Key (car *Names)
               (select (@@)
                  ((nm +TagNm @Key (nm +Tag) tsk))
                  (^ @
                     (fully '((Nm)
                           (find
                              '((This) (member Nm (: nm nm)))
                              (; (-> @@) tgs) ) )
                        (-> @Names) ) ) ) ) )
         1
         '((This) (list This)) )
      (<table> ...

Regards,
Kashyap

On Thu, Dec 5, 2019 at 10:36 AM C K Kashyap <[email protected]> wrote:

> Super! .. thanks Alex,
> Regards,
> Kashyap
>
> On Thu, Dec 5, 2019 at 9:23 AM Alexander Burger <[email protected]>
> wrote:
>
>> On Thu, Dec 05, 2019 at 08:34:34AM -0800, C K Kashyap wrote:
>> > About the "filtering with a no-op" - that was my way of getting rid of
>> > NIL's in the list - what's the right way :) ?
>>
>> Ah, yes, sure! A valid solution!
>>
>> I just did not trigger on that pattern, because I use (filter prog Lst),
>> or
>> sometimes (filter bool Lst) for that without further thinking.
>>
>> ((X) X) has a high overhead due to the EXPR function call. It binds and
>> unbinds
>> the X parameter, and runs the (almost empty) body between that.
>>
>> 'prog' is the ideal no-op function, as it evaluates all arguments, does
>> nothing else, and is a built-in and fast as such.
>>
>> ☺/ A!ex
>>
>> --
>> UNSUBSCRIBE: mailto:[email protected]?subject=Unsubscribe
>>
>

Reply via email to