Here's how to find conjunctions:

Name Class. Class of (boxed) name:  

        _2   invalid   
        _1 unused      
         0 noun        
         1 adverb      
         2 conjunction 
         3 verb        

    a=:2 3 5
    by=:' '&;@,.@[ ,. ]
    over=:({. ; }.)@":@,

    4!:0 <'a' 
0

   4!:0 <'over'
3

   4!:0 <'by'
3

   f=: @
   4!:0 <'f'
2

   g=:":   
   4!:0 <'g'
3

   h=:&
   4!:0 <'h'
2

Eliminate the conjunctions   @  and  &  to write simple J .
Also, the functions  by  and  over  are not simple J verbs.


-----Or
original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Kip Murray
Sent: Monday, November 14, 2011 3:58 PM
To: Programming forum
Subject: Re: [Jprogramming] table challenge in simple J

My definition of Simple J is more restricted and potentially makes the 
challenge greater:  Simple J uses trains and rank but no other conjunction.

On 11/14/2011 12:59 PM, Dan Bron wrote:
> How about a more difficult challenge?  It's related.  No embargo period on
this one.
>
> Write a 13 : '' for "Simple J".   In particular, write an adverb which,
given an anonymous tacit verb as an argument, derives a functionally
identical verb (in terms of I/O), but all instances of f@:g are replaced
with [: f g .  Obviously f and g here are arbitrary (could be named or
anonymous, primitive or compound, vanilla or parenthesized), and there can
be more than one use of @: in the target, and you could have uses within
uses.
>
> It would be quite interesting to me if this were presented as a tree
transformation using L: S: {:: and friends against the atomic representation
of the target.  That's not a requirement though - you could always do string
transformations on the linear rep, rearrangements on the boxed rep, etc.
>
> If this was in any way generalized, in sense that I could reuse it for
different but similar transformations, that would be more interesting still.
>
> -Dan
>
> -----Original Message-----
> From: [email protected]
[mailto:[email protected]] On Behalf Of Raul Miller
> Sent: Monday, November 14, 2011 1:25 PM
> To: Programming forum
> Subject: Re: [Jprogramming] table challenge in simple J
>
> You are correct.
>
> Nevertheless, that kind of restriction probably belongs in the subject
line.
>
----------------------------------------------------------------------
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