mod3=: 3 | ]
     mod3 11 5 3 2
2 2 0 2

2011/10/28 Andrew Pennebaker <[email protected]>

> I'm trying to make a function mod3 that returns the input modulo three, but
> my syntax is wrong. I don't see why the syntax would be any different from
> the double example in the docs.
>
> $ jconsole
>   double =: * & 2
>   double 1
> 2
>   double 2
> 4
>   double 3
> 6
>   mod3 =: 3 | &
> |syntax error
> |   mod3=:    3|&
>
>
> Cheers,
>
> Andrew Pennebaker
> www.yellosoft.us
> ----------------------------------------------------------------------
> 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: [email protected]
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