[Jprogramming] Easy way of testing identity of two verbs?
Randy MacDonald
ramacd at nbnet.nb.ca
Fri Jan 27 07:06:35 HKT 2006
Equal representations imply equal verbs, no? Sometimes that is enough.
Also: is there a reason, beyond taste, for putting the placeholder last?
-----------------------------------------------------------------------
|\/| Randy A MacDonald | you can't pay for it,
|/\| ramacd at nbnet.nb.ca | even if you want to.
BSc(Math) UNBF'83 Sapere Aude | APL: If you can say it, it's done..
Natural Born APL'er |
----------------------------------------------------(INTP)----{ gnat }-
----- Original Message -----
From: "Roger Hui" <RHui000 at shaw.ca>
To: "Programming forum" <programming at jsoftware.com>
Sent: Thursday, January 26, 2006 6:33 AM
Subject: Re: [Jprogramming] Easy way of testing identity of two verbs?
> To be precise, the phrase tests for the identity of the
> gerundial (atomic) representations. Testing whether two
> verbs are identical is not computable.
>
> Otherwise, I can not think of an easier way, although
> I would use a different placeholder, and put it last.
> You may also have to use -:!.0 instead of -: .
>
> foo=: +&7
> foo f.`- -: (+&(7+1e_13))`-
> 1
> foo f.`- -:!.0 (+&(7+1e_13))`-
> 0
> foo
> +&7
> +&(7+1e_13)
> +&7.0000000000001004
>
>
>
>
> ----- Original Message -----
> From: "June Kim" <juneaftn at gmail.com>
> To: "Programming forum" <programming at jsoftware.com>
> Sent: Thursday, January 26, 2006 2:13 AM
> Subject: [Jprogramming] Easy way of testing identity of two verbs?
>
> This is how I do it currently.
>
> u=: >:
> (]`(u f.)) -: ]`>:
> 1
> (]`(u f.)) -: ]`<:
> 0
>
> I use ] as a placeholder to use tie. Could you show me easier ways, if
any?
>
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
More information about the Programming
mailing list