spoiler alert... by placing answer at bottom



----- Original Message -----
From: Jose Mario Quintana <[email protected]>
To: Programming forum <[email protected]>
Sent: Tuesday, March 15, 2016 6:32 PM
Subject: Re: [Jprogramming] Adverbial Tacit Jym

Right, so let us add a twist to the Exercise 1:

Minor alert for anyone that have not seen Pascal's solution for a1...

7
6
5
4
3
2
1
0

Produce a1 without involving  @. in the code.

Remember: "Spoiler alerts by instructors and patrons will be appreciated."


On Mon, Mar 14, 2016 at 3:43 PM, <[email protected]> wrote:

> Pascal Jasmin wrote:
> > a0 =:
> > a1 =:
>
> You are confusing the Jym with the Spoilarium, I'm afraid.
>
>                                                 Martin Neitzel



a1 =. ({.`)(`{:)(`:6)

I can see this as better than:

a1 =. (`{.)(`{:)(@.1 0 2)

but speaking of workarounds to apply adverbs correctly, here is one method that 
makes the above easier to write, and one way to workaround the syntax error 
discussed in other thread.


eval=: 1 : ' a: 1 :  m'
lrA =: 1 : '5!:5 < ''u'''
A =: 2 : ' (u lrA , '' '' , v) eval'


 + A '`{.`{:@.1 0 2'


{. + {:

or 

+ A '({.`)`{:`:6'
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to