split looks like either 0 100&#: or 100&#.inv

g depends on f and you did not define f

Anyways, you might want:
   1234 5678 (+./"1@e.&(100&#.inv) # [) 3456
1234 5678

Or:
   G=: +./"1@e.&(100&#.inv) # [
   1234 5678 G 3456

FYI,

-- 
Raul


On Fri, Nov 11, 2011 at 6:41 PM, David Vaughan
<[email protected]> wrote:
> I have a verb split:
>
>   split =: <.@%&100 , 100&|
>   split 1234
> 12 34
>
> I want to compare numbers to see if one of their 'split regions' (e.g. 12 or 
> 34) matches a given number.
> So far I have:
>
>   ]g =. 13 :'(f y) = (f"0 x)'
> ([: f ]) = [: f"0 [
>   1234 5678 g 3456
> 0 1
> 1 0
>
> I want to make that actually return the numbers that matched, i.e.
>
> 1234
> 5678
>
> I can't seem to get a working solution for this.
>
> Any help appreciated, thanks.
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to