[Jprogramming] bug or feature?

Roger Hui rhui000 at shaw.ca
Sat Sep 1 02:10:28 HKT 2007


> x (f&n) y <=> (f&n)^:x y
> 
> but I can't quite see how that follows from what
> the Vocabulary says:
> 
> The phrase x f@[&0 y is equivalent to f^:x y , apply the monad f 
> x times to y .

Since  x f@[&0 y  is  f@[&0^:x y according to the defn,
it comes down to the meaning of  f@[&0 z  .  But:

f@[&0 z
z f@[ 0     defn of u&n
f z[0       defn of @
f z

That is, the monad  f@[&0  is the same as the monad f,
whence f@[&0^:x y is the same as f^:x y.



----- Original Message -----
From: Nollaig MacKenzie <nollaig at amhuinnsuidhe.net>
Date: Friday, August 31, 2007 10:56
Subject: Re: [Jprogramming] bug or feature?
To: Programming forum <programming at jsoftware.com>

> 
> On 2007.08.31 16:47:16, you,
>  the extraordinary Yuri Burger, emitted:
> 
> > 
> > how it works ???
> > 
> >   p=:*&0.1
> >   p 10
> > 1
> >   1 p 10
> > 1
> >   2 p 10
> > 0.1
> >   3 p 10
> > 0.01
> >   4 p 10
> > 0.001
> >   5 p 10
> > 0.0001
> > 
> > 
> > 
> > 
> >   (,&'-') '|'
> > |-
> >   2 (,&'-') '|'
> > |--
> >   10 (,&'-') '|'
> > |----------
> 
> x (f&n) y <=> (f&n)^:x y
> 
> but I can't quite see how that follows from what
> the Vocabulary says:
> 
> The phrase x f@[&0 y is equivalent to f^:x y , apply the monad f 
> x times to y .


More information about the Programming mailing list