On Wed, Mar 13, 2013 at 7:05 AM, Brian Schott <[email protected]> wrote:
> I was unaware of the Rosetta code stemplot. It is quite clean looking,
> in contrast to my ugly code. But I find it does not deal well with
> negative numbers. For example.
>
>    showStemLeaf _2 4 1 8
> ┌──┬─────┐
> │_1│8    │
> │ 0│1 4 8│
> └──┴─────┘


Of course, that is a consistent representation.

But, what do you a stem to be?

For example, would this work for you?

showStemLeaf=: (}:@":@>:@*&10@expandStems@[ ;
":&>@expandLeaves)&>/@(>@{. ; <@{:)@|:@stemleaf@/:~

Thanks,

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

Reply via email to