I think Michal wants the adverb variant

seeq =. {{ ((,[`'',])/ |.m) `: 6 y}}
so
   {{echo |. 'sinu',y}}`{{echo ,~y}}`{{echo y}} seeq 'state'
etatsunis
statestate
state


which obviously only works if his State object
will not be changed by any but the last part.
But when you have state, you want it to change.
So an explicit verb should be better here imo.


Am 30.09.21 um 23:15 schrieb Elijah Stone:
Why not define it yourself?

    seq =. {{ ((,[`'',])/ |.y) `: 6 ''}}
    seq {{echo 1}}`{{echo 2}}`{{echo 3}}
1
2
3

  -E

On Thu, 30 Sep 2021, Michal Wallace wrote:

Today I discovered that `:0 executes the gerund in series from left to
right.

The execution order isn't specified in the docs (as far as I can tell), so
I wonder if it's an implementation detail subject to change, or if I can
rely on this?

Almost all of the cases where I want '..' as a statement handler have
to do with executing small imperative niladic instructions in sequence,
and it seems like `:0'' handles that perfectly:

 NB. after loading tangentstorm/j-kvm/vt:
 (bg@16b111122)`(fg@_15)`cscr`(goxy@5 5)`(puts@('hello',CRLF))`:0''

(set the colors, clear the screen, go to position 5,5 and emit 'hello'...
in that order!)

So... Can I count on this execution order?
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

--
----------------------
mail written using NEO
neo-layout.org

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

Reply via email to