Now I've looked back to where this matter was raised, I see it concerns
Fold …

In j901-for-iOS, Fold is implemented in J, but called (as specified) with a
primitive, e.g. (F:.)
Enter:
   - F:. + i.6
_1 _3 _6 _10 _15

If that doesn't work, then you're missing the script:
~addons/dev/fold/fold.ijs
It was in fact missing from the first release: to be fixed in the next
release. Before Christmas, I hope (Apple-willing).
Locate a copy of this script (e.g. in J903 on some other platform) and move
it to your iCloud Drive.
Or pm me and I'll email you a copy of fold.ijs.
Then, using the Files App, move it into the sandbox of j901-for-iOS. Then
load it.
You can also load it directly from iCloud Drive by clicking the Import
button top-left of screen (a little box with a down arrow pointing into it)
– and doing a bit of navigating, c/f Files App.

Then try the above J sentence again.

@Mike - that should answer your question too.

On Fri, 21 Oct 2022 at 23:20, Ian Clark <earthspo...@gmail.com> wrote:

> Bob writes
> > I am pretty sure that the iPad version of J is version 901
>
> Actually it's the beta-k version of j903.
> j901 is the App Store "Product Name" (…poor choice) and is carved in
> stone, alas.
> Updates have to keep the same name, else it's an entirely new product.
>
> On Fri, 21 Oct 2022 at 19:57, 'robert therriault' via Programming <
> programm...@jsoftware.com> wrote:
>
>> Ed,
>>
>> I am pretty sure that the iPad version of J is version 901
>>
>> Cheers, bob
>>
>> > On Oct 21, 2022, at 11:55, Jan-Pieter Jacobs <
>> janpieter.jac...@gmail.com> wrote:
>> >
>> > I don't know whether you'r only looking for a tacit function, but this
>> > would also likely work if fold is unavailable for you (untested):
>> >
>> > {{ for_val. y do. if. f val do. val_index{y return. end. end.}} coords
>> >
>> > Jan-Pieter
>> >
>> > On Fri, 21 Oct 2022, 19:51 Ed Gottsman, <edward.j.gotts...@gmail.com>
>> wrote:
>> >
>> >> Pascal,
>> >>
>> >> Your original solution is perfect for me—I don’t happen to need the
>> >> index.  And there may in fact be no items with f = 1.
>> >>
>> >> Very clever: it gets a place of honor in the flashcard deck :-).
>> >>
>> >> Many thanks.
>> >>
>> >> Ed
>> >>
>> >> Sent from my iPad
>> >>
>> >>> On Oct 21, 2022, at 12:46 PM, 'Pascal Jasmin' via Programming <
>> >> programm...@jsoftware.com> wrote:
>> >>>
>> >>> if you want the index rather than the coordinate values, then
>> >>>
>> >>> (1 i.~ f) y
>> >>>
>> >>> will "short circuit" to the first 1
>> >>>
>> >>> and
>> >>>
>> >>> ({~ 1 i.~ f)
>> >>>
>> >>> may be faster to get first coordinates than my original solution,
>> though
>> >> errors if there are no items with 1 = f
>> >>>
>> >>>
>> >>>
>> >>>
>> >>> On Friday, October 21, 2022 at 12:55:41 p.m. EDT, 'Pascal Jasmin' via
>> >> Programming <programm...@jsoftware.com> wrote:
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>> }.^:(0 = f@{.)^:_
>> >>>
>> >>> will return the list with the head being the first f not equal 0.
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>> On Friday, October 21, 2022 at 12:19:41 p.m. EDT, Ed Gottsman <
>> >> edward.j.gotts...@gmail.com> wrote:
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>> Hi.  I’m blanking on something basic and research isn’t helping.  When
>> >> the blindingly obvious solution is revealed I will blame a combination
>> of
>> >> sleep deprivation and senescence.
>> >>>
>> >>> I’ve got a long list of coordinates ordered by desirability.  I want
>> to
>> >> invoke f (a custom script) with each coordinate in turn.  f may return
>> 0
>> >> (failure), in which case I want to invoke it again with the next
>> >> coordinate.  When f (eventually) returns 1, I want to terminate—the
>> >> remainder of the coordinates should not be processed.  (Note that the
>> very
>> >> first invocation of f may return 1.)
>> >>>
>> >>> This *almost* feels like ^: in its Do While form.  Almost.  It also
>> >> feels like SCs around list operations (though they seem to be limited
>> to
>> >> primitives).
>> >>>
>> >>> Help.
>> >>>
>> >>> Many thanks.
>> >>>
>> >>> Ed
>> >>>
>> >>> Sent from my iPad
>> >>> ----------------------------------------------------------------------
>> >>> For information about J forums see
>> http://www.jsoftware.com/forums.htm
>> >>>
>> >>> ----------------------------------------------------------------------
>> >>> For information about J forums see
>> http://www.jsoftware.com/forums.htm
>> >>> ----------------------------------------------------------------------
>> >>> For information about J forums see
>> http://www.jsoftware.com/forums.htm
>> >> ----------------------------------------------------------------------
>> >> For information about J forums see http://www.jsoftware.com/forums.htm
>> >>
>> > ----------------------------------------------------------------------
>> > For information about J forums see http://www.jsoftware.com/forums.htm
>>
>> ----------------------------------------------------------------------
>> 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