Or, you could do something like this:

paren=:3 :0
  y=.":y
  if.1<#;:y do. y=.'(',y,')' end.
  ;:y
)

quoted=: 1 :0
:
  ;:inv(paren x),(paren m),;:": y
)

   'g' quoted/19 29 59 79 89 109 119 139 149 179 199
19 g 29 g 59 g 79 g 89 g 109 g 119 g 139 g 149 g 179 g 199

Now you have a line you can edit - remove however much you want - and
then execute...

Or, if that's too much effort, you could just load'debug/dissect' and
then run dissect on the original sentence.

Thanks,

-- 
Raul


On Mon, Sep 18, 2017 at 10:58 PM, Jimmy Gauvin <[email protected]> wrote:
> To answer "There's got to be an easier way to list the interim values of
> insert"
>
>    g/\.19 29 59 79 89 109 119 139 149 179 199
> 4 5 6 12 12 7 4 2 6 1 199
>
> To see what \. does we can use <
>
>    <\.i.5
> ┌─────────┬───────┬─────┬───┬─┐
> │0 1 2 3 4│1 2 3 4│2 3 4│3 4│4│
> └─────────┴───────┴─────┴───┴─┘
>
> \ is usefull too:
>
>    +/\i.5
> 0 1 3 6 10
>
>    <\i.5
> ┌─┬───┬─────┬───────┬─────────┐
> │0│0 1│0 1 2│0 1 2 3│0 1 2 3 4│
> └─┴───┴─────┴───────┴─────────┘
>
>
>
> On Mon, Sep 18, 2017 at 4:48 PM, Skip Cave <[email protected]> wrote:
>
>>
>> Roger does g/ which puts g between each integer. Let's see what is going on
>> In the short case:
>>
>>      19 g 29 g 59 g 79 g 89 g 109 g 119 g 139 g 149 g 179 g 199
>>
>> 4
>>
>> Step-by-step...
>>
>>     179 g 199
>> 1
>>     149 g 1
>> 6
>>
>
> o
> o
> o
>
>>     19 g 5
>> 4
>>
>> So the secret is that Roger's scheme keeps the interim calculation values
>> small enough to avoid precision errors.
>>
>> (There's got to be an easier way to
>> list the interim values of insert). My scheme generated large interim
>> values which exceeded the precision limit.
>>
>> Skip>
>>
>>
> ----------------------------------------------------------------------
> 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