I stand corrected.

On Mon, Apr 5, 2010 at 12:26 AM, Oleg Kobchenko <[email protected]> wrote:

> Correction: e. is like "element of" in mathematics,
> denoted by ∈.
>
> "Exists" in mathematics, denoted by upside-down E,
> would be a predicate aggregate (Insert) with Or.
>
>   exists=: (+./)@:  NB. there exists yy e. y : 1 = u yy
>
>   >&0 exists _1 0 2
> 1
>   >&0 exists _1 0 _2
> 0
>
>   all=: (*./)@:      NB. for all  yy e. y : 1 = u yy
>
>   >&0 all _1 0 2
> 0
>   >&0 all 1 3 2
> 1
>
>
>
>
>
> > From: Don Guinn <[email protected]>
>
> e. is like exists in mathematics.
>
>   rtn=:'YES';'NO';'MAYBE'
>  rtn
> +---+--+-----+
> |YES|NO|MAYBE|
> +---+--+-----+
>   rtn e. <'NO'
> 0 1 0
>   (<'NO') e. rtn
> 1
>
> Your expression
> (first) asks if each atom of rtn exists in <'NO'. Which the
> second atom of rtn does. The first and third do not.
>
> I think that what
> you really want is the second expression which asks if
> <'NO'
> exists anywhere in rtn.
>
> Have you looked up e. in the dictionary?
> Lots of information there. In J it
> is not really necessary to do I/O
> all over the place to see what's going on.
> Don't try to do something
> big at first. Avoid comparing J to other
> languages. It can slow your
> understanding of J down. Play a little.
>
>
>
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to