Along the lines of Jose's "Myths Challenge", I often run into interesting
interpreter quirks.
Here's one I just found; I submit it as a J scavenger hunt. Define a
monadic verb toss such that:
3 : 'try. toss y catcht. ''caught'' end.' 0
activates the code in the "catcht." block. Here's the obvious way to do it:
toss =: 3 : 'throw.'
3 : 'try. toss y catcht. ''caught'' end.' 0
caught
But there's a catch: you may not use the control word throw. .
I've already posted a solution on the Wiki, so if you've read that, don't
spoil it for others.
-Dan
PS: I personally find these scavenger hunts amusing; so you'd have an
audience if you posted similar puzzles to this thread (or even links to past
puzzles).
PPS: The solution, slightly reworded, is posted at
http://www.jsoftware.com/jwiki/DanBron/Pretix/Tacit
--
View this message in context:
http://www.nabble.com/J-scavenger-hunt-tp14808096s24193p14808096.html
Sent from the J Programming mailing list archive at Nabble.com.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm