Looking at list>array,
: list>array ( list -- array ) [ ] lmap>array ;

You can adapt it to recurse on lists:
IN: scratchpad : deeplist>array ( list -- array ) [ dup list? [
deeplist>array ] when ] lmap>array ;

IN: scratchpad 1 nil cons 2 nil cons nil cons nil cons cons deeplist>array .
{ { 1 } { { 2 } } }

Hope that helps,
Jon

Jon

On Mon, Jun 29, 2015 at 5:03 PM, Iain Gray <iaing...@ednet.co.uk> wrote:

> that gave me
>
> { ~cons-state~ ~cons-state~ }
>
> On 29 Jun 2015, at 15:22, John Benediktsson <mrj...@gmail.com> wrote:
>
> I think you need one more "cons" at the end, but list>array should work
> fine recursively.
>
>
>
> On Mon, Jun 29, 2015 at 5:37 AM, Iain Gray <iaing...@ednet.co.uk> wrote:
>
>> I make a list with
>>
>> 1 nil cons 2 nil cons nil cons nil cons
>>
>> but list>array displays only top level, can it descend recursively?
>>
>>
>> ------------------------------------------------------------------------------
>> Monitor 25 network devices or servers for free with OpManager!
>> OpManager is web-based network management software that monitors
>> network devices and physical & virtual servers, alerts via email & sms
>> for fault. Monitor 25 devices for free with no restriction. Download now
>> http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
>> _______________________________________________
>> Factor-talk mailing list
>> Factor-talk@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/factor-talk
>>
>
>
> ------------------------------------------------------------------------------
> Monitor 25 network devices or servers for free with OpManager!
> OpManager is web-based network management software that monitors
> network devices and physical & virtual servers, alerts via email & sms
> for fault. Monitor 25 devices for free with no restriction. Download now
>
> http://ad.doubleclick.net/ddm/clk/292181274;119417398;o_______________________________________________
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
>
>
>
> ------------------------------------------------------------------------------
> Monitor 25 network devices or servers for free with OpManager!
> OpManager is web-based network management software that monitors
> network devices and physical & virtual servers, alerts via email & sms
> for fault. Monitor 25 devices for free with no restriction. Download now
> http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
> _______________________________________________
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
>
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors 
network devices and physical & virtual servers, alerts via email & sms 
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to