[Jprogramming] I want to understand under
Linda Alvord
lindaalvord at verizon.net
Fri Apr 4 09:24:05 UTC 2014
Tbe same th
-----Original Message-----
From: programming-bounces at forums.jsoftware.com [mailto:programming-bounces at forums.jsoftware.com] On Behalf Of Raul Miller
Sent: Friday, April 04, 2014 4:02 AM
To: Programming forum
Subject: Re: [Jprogramming] I want to understand under
What is h supposed to be doing?
Thanks,
--
Raul
On Fri, Apr 4, 2014 at 2:25 AM, Linda Alvord <lindaalvord at verizon.net>wrote:
> Here’s the problem. Hopefully this looks better and fully defines the
> problem.
>
> f=: 13 :' (B=:;:''am pm''),~&.>/A=:<"1 ":":"0>:i.y'
> f 12
> ┌────┬────┬────┬────┬────┬────┬────┬──
> ──┬────┬────┬────┬────┐
> │1 am│2 am│3 am│4 am│5 am│6 am│7 am│8 am│9 am│10am│11am│12am│
> ├────┼────┼────┼────┼────┼────┼────┼──
> ──┼────┼────┼────┼────┤
> │1 pm│2 pm│3 pm│4 pm│5 pm│6 pm│7 pm│8 pm│9 pm│10pm│11pm│12pm│
> └────┴────┴────┴────┴────┴────┴────┴──
> ──┴────┴────┴────┴────┘
> A
> ┌──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┐
> │1 │2 │3 │4 │5 │6 │7 │8 │9 │10│11│12│
> └──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┘
> B
> ┌──┬──┐
> │am│pm│
> └──┴──┘
> g=: 13 :'x(,~&.>)/y'
> B g A
> ┌────┬────┬────┬────┬────┬────┬────┬──
> ──┬────┬────┬────┬────┐
> │1 am│2 am│3 am│4 am│5 am│6 am│7 am│8 am│9 am│10am│11am│12am│
> ├────┼────┼────┼────┼────┼────┼────┼──
> ──┼────┼────┼────┼────┤
> │1 pm│2 pm│3 pm│4 pm│5 pm│6 pm│7 pm│8 pm│9 pm│10pm│11pm│12pm│
> └────┴────┴────┴────┴────┴────┴────┴──
> ──┴────┴────┴────┴────┘
> g
> ,~&.>/
>
> NB. x u&.v y ↔ vi (v x) u (v y) Definition of Under
>
>
> I can’t seem to write a simple definition h=: but use the second
> definition of under.
>
> It should have the same result as B g A when you enter B h A
>
> 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
More information about the Programming
mailing list