J TECH introduces @ in Grade 3!
To understand TIMES, student consider arrays of objects, in this case boxes.
They count the number of boxes to understand the verb *
After a long struggle, I am ready to cope with @ . It was a long time before
Raul managed to show how
rank works with it,
I’m always amazed at how much easier it is to teach something when I understand
it!
f=:13 :'(>:i. x),"0/>:@i. y'
g=: 13 :'((<@(<@>:@i.))"1)y'
g 3 f 3
┌───┬─────┬───────┐
│┌─┐│┌─┬─┐│┌─┬─┬─┐│
││1│││1│2│││1│2│3││
│└─┘│└─┴─┘│└─┴─┴─┘│
├───┼─────┼───────┤
│┌─┐│┌─┬─┐│┌─┬─┬─┐│
││1│││1│2│││1│2│3││
│├─┤│├─┼─┤│├─┼─┼─┤│
││2│││3│4│││4│5│6││
│└─┘│└─┴─┘│└─┴─┴─┘│
├───┼─────┼───────┤
│┌─┐│┌─┬─┐│┌─┬─┬─┐│
││1│││1│2│││1│2│3││
│├─┤│├─┼─┤│├─┼─┼─┤│
││2│││3│4│││4│5│6││
│├─┤│├─┼─┤│├─┼─┼─┤│
││3│││5│6│││7│8│9││
│└─┘│└─┴─┘│└─┴─┴─┘│
└───┴─────┴───────┘
h=: 13 :'(>@{:@,@>)"0 y'
h g 3 f 3
1 2 3
2 4 6
3 6 9
f
([: >: [: i. [) ,"0/ [: >:@i. ]
g
<@(<@>:@i.)"1
h
>@{:@,@>"0
Linda
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Raul Miller
Sent: Friday, January 23, 2015 12:00 AM
To: Programming forum
Subject: Re: [Jprogramming] Here is what I want - But a better way would be
great
Please try:
fn=: 13 :'>{:,> y'"0
fn E
Also, the next time you are frustrated by & or by @, please notice the rank of
the right hand verb.
Thanks,
--
Raul
On Thu, Jan 22, 2015 at 10:46 PM, Linda Alvord <
<mailto:[email protected]> [email protected]> wrote:
> Three @ 's in that little line!
>
> Here's an example of why @ is frustrating:
>
> f=: 13 :' >@{:@,@> y'
> f E
> 1 0 0 0
> 2 4 0 0
> 3 6 9 0
> 4 8 12 16
> g=: 13 :'([:([:([:>{:),)>)y'
> g E
> 16
>
> 5!:4 <'f'
> ┌─ >
> ┌─ @ ─┴─ {:
> ┌─ @ ─┴─ ,
> ── @ ─┴─ >
> 5!:4 <'g'
> ┌─ [:
> │ ┌─ [:
> │ │ ┌─ [:
> ──┼────┼────┼─ >
> │ │ └─ {:
> │ └─ ,
> └─ >
>
>
> ((>@{:)E)-:([:>{:)E
> 1
> (((>@{:)@,)E)-:([:([:>{:),)E
> 1
> ((>@{:)@,)E
> ┌──┬──┬──┬──┐
> │1 │2 │3 │4 │
> ├──┼──┼──┼──┤
> │5 │6 │7 │8 │
> ├──┼──┼──┼──┤
> │9 │10│11│12│
> ├──┼──┼──┼──┤
> │13│14│15│16│
> └──┴──┴──┴──┘
> ([:([:>{:),)E
> ┌──┬──┬──┬──┐
> │1 │2 │3 │4 │
> ├──┼──┼──┼──┤
> │5 │6 │7 │8 │
> ├──┼──┼──┼──┤
> │9 │10│11│12│
> ├──┼──┼──┼──┤
> │13│14│15│16│
> └──┴──┴──┴──┘
>
> ((((>@{:)@,)@>)E)-:([:([:([:>{:),)>)E
> 0
> (((>@{:)@,)@>)E
> 1 0 0 0
> 2 4 0 0
> 3 6 9 0
> 4 8 12 16
> ([:([:([:>{:),)>)E
> 16
>
> And I still don't know what your version is doing.
>
> Actually the answer must be in {: since I don't recall ever using it. More
> later..... Linda
>
>
>
> -----Original Message-----
> From: <mailto:[email protected]>
> [email protected] [
> <mailto:[email protected]>
> mailto:[email protected]] On Behalf Of Raul Miller
> Sent: Thursday, January 22, 2015 12:33 PM
> To: Programming forum
> Subject: Re: [Jprogramming] Here is what I want - But a better way would be
> great
>
> >@{:@,@>E
> 1 0 0 0
> 2 4 0 0
> 3 6 9 0
> 4 8 12 16
>
> In other words, open the last box from each box in E.
>
> --
> Raul
>
>
> On Thu, Jan 22, 2015 at 12:15 PM, Linda Alvord <
> <mailto:[email protected]> [email protected]> wrote:
>> A dialog for our TIMES! In Grade 3, counting arrays of objects leads to the
>> meaning of times. Here is a set of boxes, and then a visual image of
>> counting the boxes. Finally a times table emerges.
>>
>>
>>
>> However, is there a better way to get from E to F?
>>
>>
>>
>> 6$<' '
>>
>> --T-T-T-T-T-┐
>> │ │ │ │ │ │ │
>> L-+-+-+-+-+--
>>
>> <"0 >:i.6
>>
>> --T-T-T-T-T-┐
>> │1│2│3│4│5│6│
>> L-+-+-+-+-+--
>>
>> 2 3$<' '
>>
>> --T-T-┐
>> │ │ │ │
>> +-+-+-+
>> │ │ │ │
>> L-+-+--
>>
>> <"0 >:i.2 3
>>
>> --T-T-┐
>> │1│2│3│
>> +-+-+-+
>> │4│5│6│
>> L-+-+--
>>
>> 2*3
>>
>> 6
>>
>> 2 3 4$<' '
>>
>> --T-T-T-┐
>> │ │ │ │ │
>> +-+-+-+-+
>> │ │ │ │ │
>> +-+-+-+-+
>> │ │ │ │ │
>> L-+-+-+--
>>
>> --T-T-T-┐
>> │ │ │ │ │
>> +-+-+-+-+
>> │ │ │ │ │
>> +-+-+-+-+
>> │ │ │ │ │
>> L-+-+-+--
>>
>> <"0 >:i.2 3 4
>>
>> ---T--T--T--┐
>> │1 │2 │3 │4 │
>> +--+--+--+--+
>> │5 │6 │7 │8 │
>> +--+--+--+--+
>> │9 │10│11│12│
>> L--+--+--+---
>>
>> ---T--T--T--┐
>> │13│14│15│16│
>> +--+--+--+--+
>> │17│18│19│20│
>> +--+--+--+--+
>> │21│22│23│24│
>> L--+--+--+---
>>
>> 2*3*4
>>
>> 24
>>
>> (4*3*2)-:2*3*4
>>
>> 1
>>
>> f=: 13 :'(>:i.x),"0 / >:i.y'
>>
>> ]A=: 3 f 3
>>
>> 1 1
>> 1 2
>> 1 3
>>
>> 2 1
>> 2 2
>> 2 3
>>
>> 3 1
>> 3 2
>> 3 3
>>
>> g=: 13 :'< y $ <'' '''"1
>>
>> ]B=:g 3 f 3
>>
>> ----T-----T-------┐
>> │--┐│--T-┐│--T-T-┐│
>> ││ │││ │ │││ │ │ ││
>> │L--│L-+--│L-+-+--│
>> +---+-----+-------+
>> │--┐│--T-┐│--T-T-┐│
>> ││ │││ │ │││ │ │ ││
>> │+-+│+-+-+│+-+-+-+│
>> ││ │││ │ │││ │ │ ││
>> │L--│L-+--│L-+-+--│
>> +---+-----+-------+
>> │--┐│--T-┐│--T-T-┐│
>> ││ │││ │ │││ │ │ ││
>> │+-+│+-+-+│+-+-+-+│
>> ││ │││ │ │││ │ │ ││
>> │+-+│+-+-+│+-+-+-+│
>> ││ │││ │ │││ │ │ ││
>> │L--│L-+--│L-+-+--│
>> L---+-----+--------
>>
>> ]C=:1 2 3 {."0 1 B
>>
>> ----T-----T-------┐
>> │--┐│ │ │
>> ││ ││ │ │
>> │L--│ │ │
>> +---+-----+-------+
>> │--┐│--T-┐│ │
>> ││ │││ │ ││ │
>> │+-+│+-+-+│ │
>> ││ │││ │ ││ │
>> │L--│L-+--│ │
>> +---+-----+-------+
>> │--┐│--T-┐│--T-T-┐│
>> ││ │││ │ │││ │ │ ││
>> │+-+│+-+-+│+-+-+-+│
>> ││ │││ │ │││ │ │ ││
>> │+-+│+-+-+│+-+-+-+│
>> ││ │││ │ │││ │ │ ││
>> │L--│L-+--│L-+-+--│
>> L---+-----+--------
>>
>> i=: 13 :'([:<[:<"0[:>:i.)"1 y'
>>
>> ]D=:i 4 f 4
>>
>> ----T-----T----------T-------------┐
>> │--┐│--T-┐│--T-T-┐ │--T-T-T-┐ │
>> ││1│││1│2│││1│2│3│ ││1│2│3│4│ │
>> │L--│L-+--│L-+-+-- │L-+-+-+-- │
>> +---+-----+----------+-------------+
>> │--┐│--T-┐│--T-T-┐ │--T-T-T-┐ │
>> ││1│││1│2│││1│2│3│ ││1│2│3│4│ │
>> │+-+│+-+-+│+-+-+-+ │+-+-+-+-+ │
>> ││2│││3│4│││4│5│6│ ││5│6│7│8│ │
>> │L--│L-+--│L-+-+-- │L-+-+-+-- │
>> +---+-----+----------+-------------+
>> │--┐│--T-┐│--T-T-┐ │--T--T--T--┐ │
>> ││1│││1│2│││1│2│3│ ││1│2 │3 │4 │ │
>> │+-+│+-+-+│+-+-+-+ │+-+--+--+--+ │
>> ││2│││3│4│││4│5│6│ ││5│6 │7 │8 │ │
>> │+-+│+-+-+│+-+-+-+ │+-+--+--+--+ │
>> ││3│││5│6│││7│8│9│ ││9│10│11│12│ │
>> │L--│L-+--│L-+-+-- │L-+--+--+--- │
>> +---+-----+----------+-------------+
>> │--┐│--T-┐│---T--T--┐│---T--T--T--┐│
>> ││1│││1│2│││1 │2 │3 │││1 │2 │3 │4 ││
>> │+-+│+-+-+│+--+--+--+│+--+--+--+--+│
>> ││2│││3│4│││4 │5 │6 │││5 │6 │7 │8 ││
>> │+-+│+-+-+│+--+--+--+│+--+--+--+--+│
>> ││3│││5│6│││7 │8 │9 │││9 │10│11│12││
>> │+-+│+-+-+│+--+--+--+│+--+--+--+--+│
>> ││4│││7│8│││10│11│12│││13│14│15│16││
>> │L--│L-+--│L--+--+---│L--+--+--+---│
>> L---+-----+----------+--------------
>>
>> ]E=:1 2 3 4{."0 1 D
>>
>> ----T-----T----------T-------------┐
>> │--┐│ │ │ │
>> ││1││ │ │ │
>> │L--│ │ │ │
>> +---+-----+----------+-------------+
>> │--┐│--T-┐│ │ │
>> ││1│││1│2││ │ │
>> │+-+│+-+-+│ │ │
>> ││2│││3│4││ │ │
>> │L--│L-+--│ │ │
>> +---+-----+----------+-------------+
>> │--┐│--T-┐│--T-T-┐ │ │
>> ││1│││1│2│││1│2│3│ │ │
>> │+-+│+-+-+│+-+-+-+ │ │
>> ││2│││3│4│││4│5│6│ │ │
>> │+-+│+-+-+│+-+-+-+ │ │
>> ││3│││5│6│││7│8│9│ │ │
>> │L--│L-+--│L-+-+-- │ │
>> +---+-----+----------+-------------+
>> │--┐│--T-┐│---T--T--┐│---T--T--T--┐│
>> ││1│││1│2│││1 │2 │3 │││1 │2 │3 │4 ││
>> │+-+│+-+-+│+--+--+--+│+--+--+--+--+│
>> ││2│││3│4│││4 │5 │6 │││5 │6 │7 │8 ││
>> │+-+│+-+-+│+--+--+--+│+--+--+--+--+│
>> ││3│││5│6│││7 │8 │9 │││9 │10│11│12││
>> │+-+│+-+-+│+--+--+--+│+--+--+--+--+│
>> ││4│││7│8│││10│11│12│││13│14│15│16││
>> │L--│L-+--│L--+--+---│L--+--+--+---│
>> L---+-----+----------+--------------
>>
>> ]F=:([:><)"0 (>./)"1([:,[:>>)"0 E
>>
>> 1 0 0 0
>> 2 4 0 0
>> 3 6 9 0
>> 4 8 12 16
>>
>>
>>
>> Linda
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> ----------------------------------------------------------------------
>> For information about J forums see <http://www.jsoftware.com/forums.htm>
>> http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see <http://www.jsoftware.com/forums.htm>
> http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see <http://www.jsoftware.com/forums.htm>
> http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see <http://www.jsoftware.com/forums.htm>
http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm