I am sure that if you want to get beginners into J then tacit programming is
not the first choice.
Try making simple verbs and do simple stuff and use one operation at a time

M1=: 3 : 0
a=:>{.y
b=:>}.y
a;a+b
)

M2=: 3 : 0
a=:>{.y
b=:>}.y
a;a*b
)

M3=: 3 : 0
a=:>{.y
b=:>}.y
a;a%b
)

M3 M2 M1 3;5

M11=: 3 : 0
a=:>{.y
b=:>}.y
RES_M1=: a+b
a;b
)

M21=: 3 : 0
a=:>{.y
b=:>}.y
RES_M2=: a*b
a;b
)

M31=: 3 : 0
a=:>{.y
b=:>}.y
RES_M3=: a%b
a;b
)

M31 M21 M11 3;5

'R' names''

RES_M1
8
   RES_M3
15
   RES_M3
0.6

2009/4/25 Björn Helgason <[email protected]>

> If you want J to work very simply you can use it strictly as monadic.
>
> For a beginner that is probably enough.
>
> In a user written verb you can pass (y) into the verb that has two parts
> like (x;y)  and split  them up  into  x and why  inside the  verb  before
> use.
>
> Then you rules to follow is very simple.
>
> 2009/4/25 Don Watson <[email protected]>
>
>> _____________________________________________________
>>
>> EXPLICIT J
>>
>>    In explicit J, a monadic verb takes an argument from its right,
>> transforms it and passes it to its left:
>>
>>            <-----------Monadic verb<---------------
>>
>>    So in a stream of monadic verbs, execution proceeds through each
>> monadic
>> verb in turn:
>>
>> <-- Monadic verb <-- Monadic verb <-- Monadic verb <--Monadic verb<--
>>
>>
>


-- 
Björn Helgason, Verkfræðingur
Fugl&Fiskur ehf,
Þerneyjarsundi 23, Hraunborgum
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