> >>+: , ] `+/ % # C:: @
> >>
> >> (+: , ])@(+/ % #)
> >>
> >> '+: , ] ` + / % #' gg cc '@' 1 2 3
> >> 4 2
> >>
> >>
> >> underlying code is pretty short though, (except for aar dependencies)
x27; gg cc '@' 1 2 3
>> 4 2
>>
>>
>> underlying code is pretty short though, (except for aar dependencies)
>>
>> strinsert =: 1 : ' [ , u , ]'
>> eval =: 1 : ' a: 1 : m'
>> isNoun =: (0 = 4!:0 ::0:)@:<
>> aar =: 1 : 'if. isNoun ''u'' do. q
encies)
>
> strinsert =: 1 : ' [ , u , ]'
> eval =: 1 : ' a: 1 : m'
> isNoun =: (0 = 4!:0 ::0:)@:<
> aar =: 1 : 'if. isNoun ''u'' do. q =. m eval else. q =. u end. 5!:1 <
> ''q'' '
>
> cc =: 2 :
_____
From: Raul Miller
To: Programming forum
Sent: Sunday, September 24, 2017 10:56 PM
Subject: Re: [Jprogramming] Gerund composed application
Ah, sorry, I had not read your original post close enough. That's a
bad habit, and I need to do better on reading other people's c
I am surprised to hear that the second solution produces a syntax error in
J604 even taking into account that J604 is quite old. I am pretty sure it
should work in J701 and definitely works in,
JVERSION
Engine: j805/j64/windows
Release: commercial/2016-12-11T08:02:16
Library: 8.05.10
Qt IDE: 1
Ah, sorry, I had not read your original post close enough. That's a
bad habit, and I need to do better on reading other people's concepts.
That said, I can offer some variants on Jose's approach:
at=:4 :0
x`:6@:(y`:6)`''
)
Example use:
at/(]`{.`{:`{:)
Or, equivalently:
at=: (<'@:') ,@<@,
rob=: {: ,~ ({.[:`'') ,@,. }:
g=: %:`*:`+:
g
+--+--+--+
|%:|*:|+:|
+--+--+--+
rob g
+--+--+--+--+--+
|[:|%:|[:|*:|+:|
+--+--+--+--+--+
(rob g)`:6]5
10
"rob" transforms your gerund into a suitable train. You can then apply it with
`:6.
Cheers,
Louis
> On 24 Sep 2017, at 20:35, Rob
Thanks for replying Raul, your solutions weren't what I was looking for,
but I understand the confusion from my first explanation.
Jose your first solution worked perfectly, thanks very much! The other two
solutions you gave caused syntax errors for me, must be different versions,
I'm on 604.
Wha
Hi, sorry let me try to clarify and give my own use case.
I'm looking for a function which takes a gerund on the left and applies the
gerund's verbs one by one monadically from right to left to the right
argument, (with no rank modifications to the verbs).
My use case is that I'm implementing red
an=. <@:((,'0') (,&:<) ])NB. Atomizing words (monadic verb)
f=. '(x , an y)`:6' (dyad :) NB. Explicit compliant version
(*:`+:) f 4
64
train=. (<'`:')(0:`)(,^:)&6
f=. train@:([ , an@:]) f. NB. Non-compliant fixed tacit version
(*:`+:) f 4
64
f=. "..@:([ , "..i
You did not give an example of what you want to see, and your
description allows for at least two different interpretations:
f1=: 4 :'x`:6 y'"_1
f2=: 4 :'((#y)$x) f1 y'
They both give the same result when x and y have the same number of items.
What are you trying to do?
Thanks,
--
Raul
On
Hi guys,
I am wondering if there already exists a way of doing something that I
want, which is an elementary enough operation that I was quite surprised to
not have found it in jvoc/evoke gerund.
If I have some gerund say *:`+: I am looking for some function which will
apply the gerund's constit
12 matches
Mail list logo