I used

randel =: (? @: #) { ]

Your definition

rand =: randel bind l

does indeed work.  I didn't know there was another bind op besides &, which I now note is actually "bond".

How can I learn more about functions like bind that aren't on NuVoc?


On 11/27/2017 12:09 PM, Raul Miller wrote:
It's all about tradeoffs.
Of course.  Before investing months or years in J I want to believe it makes the right trade-offs.  J seems like it might make a great scripting language, but some of the design decisions worry me: it seems to have been intended for serious coding, which hobbles it for light scripting.

When I find that I can't define a simple nullary function to produce a random value, I worry about what other unpleasant surprises might be down the pike.


Also, you did not provide a definition nor any examples for randel,
but I suspect that (rand =: randel bind l) will do what you are asking
for.

Good luck,


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

Reply via email to