'a b c d ' -. ' '
abcd
i. 10
0 1 2 3 4 5 6 7 8 9
(i.10) -. 2 3 5 7
0 1 4 6 8 9
Is there anything similar in Kona?
Thanks, Steve
kona is using
#define __dv "{x _dvl ,y}"
#define __dvl "{x@&(#y)=y?/:x}"
this is just a more awkward formulation of the previous.
y?/:x is find each of x in y, return size of the list if not found (a
kludge), so comparing for equality with this list size ((#y)=) gives
you the negated boolean list as before. the rest is the same
"?/:" adds another level of indirection before you can optimize `in`.
also backwards...?
On Tue, Feb 11, 2020 at 7:42 AM Kevin Lawler <kevin...@gmail.com> wrote:
>
> i think these are the reserved verbs _dv and _dvl
>
> speaking as apls we can accomplish this using "x[where not x in y]",
> ie, create a linear boolean list of presence of x in y, then negate it
> and index x on it.
>
> this is one of several paths. on this path the primary optimization
> point is "x in y" which is voluminous in scope. depends on type,
> attribute, ...
>
> secondarily you can optimize "A. index B. where C. not" on the boolean list
>
> On Tue, Feb 11, 2020 at 6:49 AM Steve Graham
> <solitary....@gmail.com> wrote:
> >
> > In J, you can calculate the set difference as such:
> >
> > 'a b c d ' -. ' '
> >
> > abcd
> >
> >
> > i. 10
> >
> > 0 1 2 3 4 5 6 7 8 9
> >
> >
> > (i.10) -. 2 3 5 7
> >
> > 0 1 4 6 8 9
> >
> >
> > Is there anything similar in Kona?
> >
> >
> > Thanks, Steve
> >
> > --
> > You received this message because you are subscribed to the Google Groups "Kona Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to kona...@googlegroups.com.
word@&{~" "=$x}'word::" Programming Praxis "> To view this discussion on the web visit https://groups.google.com/d/msgid/kona-user/aa832bf0-0119-48ff-80c9-bc444f4c1d3f%40googlegroups.com.