[Jprogramming] Monad - Dyad
Linda Alvord
lindaalvord at verizon.net
Fri Oct 28 17:39:14 HKT 2011
That was easy, Thanks Linda
-----Original Message-----
From: programming-bounces at jsoftware.com
[mailto:programming-bounces at jsoftware.com] On Behalf Of Markus
Schmidt-Gröttrup
Sent: Friday, October 28, 2011 5:33 AM
To: Programming forum
Subject: Re: [Jprogramming] Monad - Dyad
A space is needed: Just define
g =: % : *
g 3
0.333333
4 g 5
20
Greetings, Markus
Am 28.10.2011 11:23, schrieb Linda Alvord:
> How can I define a function to test : used as Monad/Dyad ?
>
>
>
> ]a=:?i.10
>
> 0.434701 0 1 1 1 1 0 6 6 6
>
> ]b=:?i.10
>
> 0.0736612 0 0 2 3 2 3 0 7 2
>
> *a
>
> 1 0 1 1 1 1 0 1 1 1
>
> *b
>
> 1 0 0 1 1 1 1 0 1 1
>
> %a
>
> 2.30043 _ 1 1 1 1 _ 0.166667 0.166667 0.166667
>
> %b
>
> 13.5757 _ _ 0.5 0.333333 0.5 0.333333 _ 0.142857 0.5
>
> f=: %:*
>
> f
>
> %: *
>
> g=: (%):*
>
> |spelling error
> | g=: (%):*
> | ^
>
>
>
> 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