On Mon, Apr 23, 2012 at 5:17 AM, Aai <[email protected]> wrote:
> Nice to see reusable code like 'trivial' and interesting case-select
> code with an adverb selector like:
>
>> reduceStep=: reduce0`reduce1`]@.(2<. {.@{.) NonTrivial
..but I think that that would be more meaningful if reduce0 and
reduce1 had better names.
> I agree with your final note.
> *./0={.y
> handles both
> i.0 and i.0 0
And it handles i.1 0
I think i.1 0 corresponds to Haskell's [[]] -- I do not think Haskell
can distinguish between i.0 and i.0 0 using its list notation and
patterns.
To represent i.0 0 I think you need a different kind of type in Haskell.
--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm