I think you need one more cons at the end, but listarray 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 listarray displays only top level, can it descend recursively?
I make a list with
1 nil cons 2 nil cons nil cons nil cons
but listarray displays only top level, can it descend recursively?
--
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based
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 listarray should work fine
recursively.
On Mon, Jun 29, 2015 at 5:37 AM, Iain Gray iaing...@ednet.co.uk
Looking at listarray,
: listarray ( list -- array ) [ ] lmaparray ;
You can adapt it to recurse on lists:
IN: scratchpad : deeplistarray ( list -- array ) [ dup list? [
deeplistarray ] when ] lmaparray ;
IN: scratchpad 1 nil cons 2 nil cons nil cons nil cons cons deeplistarray .
{ { 1 } { { 2 }
that worked thanks
now just to sort my prefix Scheme code into postfix Factor
On 29 Jun 2015, at 16:33, Jon Harper jon.harpe...@gmail.com wrote:
Looking at listarray,
: listarray ( list -- array ) [ ] lmaparray ;
You can adapt it to recurse on lists:
IN: scratchpad : deeplistarray (
unfortunately not for nested lists
IN: scratchpad nil nil 7 swons nil 8 swons swons listarray
--- Data stack:
+nil+
{ ~cons-state~ 7 }
On 29 Jun 2015, at 16:55, Björn Lindqvist bjou...@gmail.com wrote:
In addition to the other suggestions, maybe you really want swons?
IN: scratchpad nil
In addition to the other suggestions, maybe you really want swons?
IN: scratchpad nil 77 swons 10 swons 20 swons listarray .
{ 20 10 77 }
2015-06-29 14:37 GMT+02:00 Iain Gray iaing...@ednet.co.uk:
I make a list with
1 nil cons 2 nil cons nil cons nil cons
but listarray displays only top