[Jprogramming] Understanding C. , A.
Linda Alvord
lindaalvord at verizon.net
Thu Feb 2 07:00:51 HKT 2012
Sorry I missed the version by Arie. Nice!
3 6 (i=:-@#@[ |. C.) 'abc*ef*g'
**abcefg
i
-@#@[ |. C.
j=: 13 :'(-#x)|.x C.y'
j
C. |.~ [: - [: # [
3 6 j 'abc*ef*g'
**abcefg
Linda
-----Original Message-----
From: programming-bounces at jsoftware.com
[mailto:programming-bounces at jsoftware.com] On Behalf Of Linda Alvord
Sent: Wednesday, February 01, 2012 5:20 PM
To: 'Programming forum'
Subject: Re: [Jprogramming] Understanding C. , A.
I'm happiest with the explicit version. It shows the arguments needed for
the application.
3 6 (f=:<:@-@[ C.&.|. ]) 'abc*ef*g'
**abcefg
3 6 f a=:'abc*ef*g'
**abcefg
g=: 13 :'(<:-x)C.&.|.y'!
3 6 g a
**abcefg
f
<:@-@[ C.&.|. ]
g
] C.&.|.~ [: <: [: - [
g=: 13 :'(<:-x)C.&.|.y'
J provides the ~ which shows up in the tacit version above.
Then there is h with no ~ and no &.
h=: 13 :'|.(<:-x)C.|.y'
h
[: |. ([: <: [: - [) C. [: |. ]
3 6 h a
**abcefg
Linda
-----Original Message-----
From: programming-bounces at jsoftware.com
[mailto:programming-bounces at jsoftware.com] On Behalf Of Roger Hui
Sent: Wednesday, February 01, 2012 11:26 AM
To: Programming forum
Subject: Re: [Jprogramming] Understanding C. , A.
Personally, I dislike expressions with multiple uses of ~ as they make my
head spin.
3 6 (C.&.|.~ <:@-)~ 'abc*ef*g'
**abcefg
3 6 (<:@-@[ C.&.|. ]) 'abc*ef*g'
**abcefg
I much prefer the second over the first.
On Wed, Feb 1, 2012 at 8:05 AM, Aai <agroeneveld400 at gmail.com> wrote:
> Ah, I see that's a bit like yours David.
>
> Modifying it for 1< #x
>
> 3 6 (C. |.~ -@#@[) 'abc*ef*g'
> **abcefg
>
>
> (from Essays)
>
> 3 6 (C.&.|.~ <:@-)~ 'abc*ef*g'
> **abcefg
>k
>
>
>
> On 01-02-12 16:47, Aai wrote:
> > Sorry for the noise. You should forget the previous ones I sent: they
> > are wrong.
> >
> > It looks like this one is ok:
> >
> > mtf=:_1&|. at C.
> >
> > ]samples=: '*abcef' |."0 1 ~-i.6
> > *abcef
> > f*abce
> > ef*abc
> > cef*ab
> > bcef*a
> > abcef*
> >
> >
> > ]res=: '*' ([,-.~) "1 samples
> > *abcef
> > *fabce
> > *efabc
> > *cefab
> > *bcefa
> > *abcef
> >
> > res -: mtf&>/"1 (;~I.@:('*'&=))"1 samples
> > 1
> >
> >
> >
> >
>
> --
> Met vriendelijke groet,
> @@i = Arie Groeneveld
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
More information about the Programming
mailing list