(- ^: (trigger */@:-.@e.~ ])^:_ ) 2 3 5 7
2 3 5 7
   (- ^: (trigger */@:-.@e.~ ])^:_ ) 33

goes into a seemingly endless loop

2011/10/8 Raul Miller <rauldmil...@gmail.com>

> On Sat, Oct 8, 2011 at 12:19 PM, David Vaughan
> <purpleblue...@googlemail.com> wrote:
> > Could you maybe explain how that tacit verb works (and how it works with
> 'verb')? Is it something along the lines of, see if the input is not a
> member of trigger, multiply with trigger to get 0 0 or outp1 outp2, ... then
> I run out of ideas. :P
> >
> > On 8 Oct 2011, at 15:58, R.E. Boss wrote:
> >
> >> trigger=: outp1, outp2
> >>
> >> verb ^: (trigger */@:-.@e.~ ])^:_ input
>
>   outp1=: 2
>  outp2=: 5
>  trigger=: outp1, outp2
>
>  trigger e.~ 2 3 5 7
> 1 1
>  trigger e.~ 1 2 3 4
> 1 0
>  trigger e.~ 5 6 7 8
> 0 1
>  trigger e.~ 9 10 11 12
> 0 0
>
>  -.1 1
> 0 0
>  -.1 0
> 0 1
>  -.0 1
> 1 0
>  -.0 0
> 1 1
>
>  */0 0
> 0
>  */0 1
> 0
>  */1 0
> 0
>  */1 1
> 1
>
> So (trigger */@:-.@e.~ ]) is 1 when neither element of trigger is
> present in its right argument and 0 otherwise.
>
> Meanwhile verb does whatever you need it to do (but you have not said
> what that is yet, so we cannot make any useful suggestions there).
>
> FYI,
>
> --
> Raul
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>



-- 
Björn Helgason, Verkfræðingur
Fornustekkum II
781 Hornafirði,
t-póst: gos...@gmail.com
gsm: +3546985532
twitter: @flugfiskur
http://groups.google.com/group/J-Programming


Tæknikunnátta höndlar hið flókna, sköpunargáfa er meistari einfaldleikans

góður kennari getur stigið á tær án þess að glansinn fari af skónum
          /|_      .-----------------------------------.
         ,'  .\  /  | Með léttri lund verður        |
     ,--'    _,'   | Dagurinn í dag                     |
    /       /       | Enn betri en gærdagurinn  |
   (   -.  |        `-----------------------------------'
   |     ) |         (\_ _/)
  (`-.  '--.)       (='.'=)   ♖♘♗♕♔♙
   `. )----'        (")_(") ☃☠
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to