Pascal wrote:
>  something a little silly with the original coerce definition is:
>     <`> coerce (1-L.) <<2
>  +-+
>  |2|
>  +-+
>  or
>     <`>`(>@>)`> coerce (1-L.) <<<2
>  +-+
>  |2|
>  +-+

This is J. You don't need silly tricks. You only need algebra:

           coerce =: ^: 

           < coerce (1-L.) <<2
        +-+
        |2|
        +-+
           < coerce (1-L.) <<<2
        +-+
        |2|
        +-+
           < coerce (1-L.) <^:100] 2  NB.  Try writing that using @.
        +-+
        |2|
        +-+

I'll have to think more about your "super conjunction" idea before I can 
comment.

-Dan

PS: For more on the power of coercion and the elegance of J's algebra, scroll 
to about the middle of the message below, starting at "Or, have you seen the 
power operator?".
    http://www.jsoftware.com/pipermail/programming/2009-November/017042.html




----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to