Raul, Here's my solution (with lots of help from your solution)

A=:'1809';'Philip St. George Cooke';'1895'
   B=:'1836';'Flora Cooke Stuart';'1923'
   C=:'1833';'Jeb Stuart';'1864'
   D=:'1834';'Jacob Sharpe';'1892'
   [E=:A,B,C,:D
┌────┬───────────────────────┬────┐
│1809│Philip St. George Cooke│1895│
├────┼───────────────────────┼────┤
│1836│Flora Cooke Stuart     │1923│
├────┼───────────────────────┼────┤
│1833│Jeb Stuart             │1864│
├────┼───────────────────────┼────┤
│1834│Jacob Sharpe           │1892│
└────┴───────────────────────┴────┘
   rm=: [ /: <:@] {"1 [
   la=: 13 :'x /: (<:y) {"1 x'
   (E rm 1)-:E la 1
1
   (E rm 3)-:E la 3
1

Now on to the fourth column of their ages...

Linda
-----Original Message-----
From: Programming [mailto:[email protected]] On Behalf 
Of Linda A Alvord
Sent: Tuesday, June 28, 2016 10:16 PM
To: [email protected]
Subject: Re: [Jprogramming] How many years did each person live?

Thanks Ric, I'll check it out tomorrow.  Jacob Sharpe died in 1892.v Linda

----Original Message-----
From: Programming [mailto:[email protected]] On Behalf 
Of Ric Sherlock
Sent: Tuesday, June 28, 2016 9:41 PM
To: Programming JForum

Subject: Re: [Jprogramming] How many years did each person live?

Here is a reasonably concise one but I suspect not your preferred version
   f1=: (, {: -&.(".@>) {.)"1
   f1 E
┌────┬───────────────────────┬────┬─────┐

│1809│Philip St. George Cooke│1895│86   │

├────┼───────────────────────┼────┼─────┤

│1836│Flora Cooke Stuart     │1923│87   │

├────┼───────────────────────┼────┼─────┤

│1833│Jeb Stuart             │1864│31   │

├────┼───────────────────────┼────┼─────┤

│1834│Jacob Sharpe           │189 │_1645│

└────┴───────────────────────┴────┴─────┘


Here is a simpler explicit one.
f2=: 3 :'y ,. 8!:0 -/"1 (_99) ". > 2 0 {"1 y'


On Wed, Jun 29, 2016 at 12:45 PM, Linda A Alvord <[email protected]>
wrote:

> Nowdefine a verb to add a 4th column of the life span of each person.
>
>
>
> A=:'1809';'Philip St. George Cooke';'1895'
>
>    B=:'1836';'Flora Cooke Stuart';'1923'
>
>    C=:'1833';'Jeb Stuart';'1864'
>
>    D=:'1834';'Jacob Sharpe';'189'
>
>    [E=:A,B,C,:D
>
> -----T-----------------------T----┐
> │1809│Philip St. George Cooke│1895│
> +----+-----------------------+----+
> │1836│Flora Cooke Stuart     │1923│
> +----+-----------------------+----+
> │1833│Jeb Stuart             │1864│
> +----+-----------------------+----+
> │1834│Jacob Sharpe           │189 │
> L----+-----------------------+-----
>
>
>
> Linda
>
>
>
> ----------------------------------------------------------------------
> 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
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to