OK, conjunction
recur =: 2 : '(, u)^:n'
and you can still write the verbs. As you can see, the result of recur applies
u to the current list and appends that result to the current list, repeating
this operation n times. Just about any list can be produced by designing an
appropriate u .
I think you taught me this approach in chapter 16 of JforC Programmers, Henry
:)
modPlus=: |+[*0=|
12 modPlus 9 + i. 7
9 10 11 12 1 2 3
Cheers, bob
On 2012-12-24, at 12:54 PM, Henry Rich wrote:
> I don't get what your 'offset' field is, but |&.<: might be useful:
>
> 12 | 9+i. 7
> 9
I don't get what your 'offset' field is, but |&.<: might be useful:
12 | 9+i. 7
9 10 11 0 1 2 3
12&|&.<: 9+i. 7
9 10 11 12 1 2 3
Henry Rich
On 12/24/2012 3:49 PM, PackRat wrote:
I have need for a verb like residue | but which returns the mod value
instead of 0. For example, instead of 9
I have need for a verb like residue | but which returns the mod value
instead of 0. For example, instead of 9 10 11 0 1 2 3 4... for a mod
value of 12, it will return 9 10 11 12 1 2 3 4 I can do it easily
for a single datum, but I can't see how to do it in one fell swoop for
a whole list
I agree with your analysis (though rather than "vestigial", I'd say J's ability
to build a standalone app is "mythical": it makes a great story, but it never
really existed).
With that said, if the article really seeks to determine "can you build a
desktop application to distribute your work?",