Re: [Factor-talk] displaying Lisp like nested lists

2015-06-29 Thread Iain Gray
unfortunately not for nested lists IN: scratchpad nil nil 7 swons nil 8 swons swons list>array --- Data stack: +nil+ { ~cons-state~ 7 } > On 29 Jun 2015, at 16:55, Björn Lindqvist wrote: > > In addition to the other suggestions, maybe you really want swons? > > IN: scratchpad nil 77 swons 10

Re: [Factor-talk] displaying Lisp like nested lists

2015-06-29 Thread Björn Lindqvist
In addition to the other suggestions, maybe you really want swons? IN: scratchpad nil 77 swons 10 swons 20 swons list>array . { 20 10 77 } 2015-06-29 14:37 GMT+02:00 Iain Gray : > I make a list with > > 1 nil cons 2 nil cons nil cons nil cons > > but list>array displays only top level, can it des

Re: [Factor-talk] displaying Lisp like nested lists

2015-06-29 Thread Iain Gray
that worked thanks now just to sort my prefix Scheme code into postfix Factor > On 29 Jun 2015, at 16:33, Jon Harper wrote: > > Looking at list>array, > : list>array ( list -- array ) [ ] lmap>array ; > > You can adapt it to recurse on lists: > IN: scratchpad : deeplist>array ( list -- array )

Re: [Factor-talk] displaying Lisp like nested lists

2015-06-29 Thread Jon Harper
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 } {

Re: [Factor-talk] displaying Lisp like nested lists

2015-06-29 Thread Iain Gray
that gave me { ~cons-state~ ~cons-state~ } > On 29 Jun 2015, at 15:22, John Benediktsson 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 > wrote: > I make

Re: [Factor-talk] displaying Lisp like nested lists

2015-06-29 Thread John Benediktsson
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 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? > > > ---

[Factor-talk] displaying Lisp like nested lists

2015-06-29 Thread Iain Gray
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 netw