Your brain is in two parts….left and right. The left part has nothing right
in it and the right has nothing left in it.

2008/6/29 Viktor Cerovski <[EMAIL PROTECTED]>:

>
>
> Raul Miller-4 wrote:
> >
> > On 6/28/08, Jack Andrews <[EMAIL PROTECTED]> wrote:
> >> how would you express the 'less interesting' case in J?
> >
> >    ({.-+/@}.)1 2 3 4 5
> >
> >
>
> Although this is correct in the case of -, I think the general solution to
> this
> problem is -~/|.1 2 3 4 5
>
>  -/1 2 3 4 5
> 3
>  -~/|.1 2 3 4 5
> _13
>
> in the following sense:
>
> f/1 2 3 4 5    NB. evaluates as:
>
>  1 f 2 f 3 f 4 f 5
>  (1 f(2 f(3 f(4 f 5))))     NB. default right to left order
>
>
> f~/|.1 2 3 4 5  evaluates as:
>
>  f~/5 4 3 2 1              NB. default right to left order
>  5 f~ 4 f~ 3 f~ 2 f~ 1
>  (5 f~(4 f~(3 f~(2 f~ 1)))) NB. default right to left order
>  (4 f~(3 f~(2 f~ 1)))f 5
>  ((3 f~(2 f~ 1))f 4)f 5
>  (((2 f~ 1)f 3)f 4)f 5
>  (((1 f 2)f 3)f 4)f 5       NB. left to right order
>
> --
> View this message in context:
> http://www.nabble.com/right-to-of-left----what-about-left-to-right--tp18155817s24193p18180713.html
> Sent from the J Chat mailing list archive at Nabble.com.
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>



-- 
Björn Helgason, Verkfræðingur
Fugl&Fiskur ehf,
Fornustekkum II, 781 Hornafirði
Po Box 127,801 Selfoss ,
t-póst: [EMAIL PROTECTED]
gsm: +3546985532
Landslags og skrúðgarðagerð, gröfuþjónusta
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