I =&:({.@(,&'')) B
0
but I can't see why this is guaranteed.
Henry Rich
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Dan Bron
> Sent: Wednesday, March 14, 2007 4:31 PM
> To: General forum
> Subject: [Jgeneral] A typical challenge (was: definition of a:)
>
> Let me put this a different way. Solve the following puzzle in J.
>
> Demonstrate the difference between:
>
> I =: $0
>
> and
>
> B =: 0$0
>
> The difference must be guarunteed (predicted, fully
> supported) by the Dictionary, excluding the foreign
> conjunction !: and the Appendicies. To put it another way,
> you may not leverage bugs in the implementation or J's introspection.
>
> Assume you're running under jconsole -jprofile: that is, you
> may not depend on any sentence having been executed before
> your own. Put another way, do not rely on the names normally
> defined by the J standard library.
>
> For example, if I'd said find the difference between I and
>
> L =: ''
>
> you could easily demonstrate it thus:
>
> I =&{. L
> 0
>
> and support it by quoting Section II.B or the Vocabulary
> entry for {. :
>
> 2302 239 qdoj '{.' NB.
> http://www.jsoftware.com/help/dictionary/dictb.htm
> In an overtake (in which the number to be taken exceeds
> the number of items), extra items consist of fills; zeros
> if y is numeric, a: if it is boxed, spaces if literal, and
> s: ' ' if symbol.
>
>
> 2725 163 qdoj 'dictb' NB.
> http://www.jsoftware.com/help/dictionary/d521.htm
> padding with an appropriate fill element: space for a
> character array, 0 for a numeric array, and a boxed empty
> list for a boxed array.
>
> but the task will not be so trivial with I vs B .
> Remember that you may not use !: .
>
> -Dan
>
>
> ----------------------------------------------------------------------
> For information about J forums see
> http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm