> On 5 Aug 2018, at 11:59 am, Monte Goulding via use-livecode > <use-livecode@lists.runrev.com> wrote: > > Just to throw it out there I still want to add `each` to filter one day. So > in this case I think it would be: > > filter keys of tArray1 with expression \ > each is among the keys of tArray2 and \ > tArray1[each] is not tArray2[each]
Given I have been wanting to do ^ for a couple of years I decided to just go ahead and do it… might be a while before we have time to bikeshed the syntax though. https://github.com/livecode/livecode/pull/6626 <https://github.com/livecode/livecode/pull/6626> Examples: local tFoo,tBar put "foo" into tFoo[1] put "bar" into tFoo[2] put "baz" into tBar[1] put "bar" into tBar[2] filter keys of tFoo with expression tFoo[each] is tBar[each] — tFoo now has one key 2 which is `bar` put “yes,foo” & return & “no,bar” into tFoo filter lines of tFoo with expression item 1 of each is “yes” We could feasibly not use `with|without` for this forcing the expression to return true to filter. If we went that way then perhaps `where` would be nicest? filter lines of tFoo where item 1 of each is “yes” Cheers Monte _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode