Re: [Factor-talk] nested nil lists
yes. Which is the same as ```nil 1list```. Jon On Fri, Jul 3, 2015 at 11:40 AM, Iain Gray iaing...@ednet.co.uk wrote: is nil nil cons ok? On 3 Jul 2015, at 10:14, Iain Gray iaing...@ednet.co.uk wrote: in Scheme I can evaluate (list ‘()) to get ‘(()) as a nested null list Factor supplies nil (+nil+) but I can’t seem to get the above using cons, 1list etc. is this not the natural way to do this in Factor? -- Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Factor-talk Digest, Vol 109, Issue 1
Is it true that in Factor the quotation has access to the parent function's local variables? Over on comp.lang.forth Bernd Payson has said that in Factor quotations do not have access to the parent function's local variables --- he uses this argument to justify that his quotations (just :NONAME with some syntactic sugar) don't need to have access to the parent function's locals. Anyway, in LOTD my quotations have access to the parent function's local variables. regards --- Hugh On Friday, July 3, 2015 10:53 AM, factor-talk-requ...@lists.sourceforge.net factor-talk-requ...@lists.sourceforge.net wrote: Send Factor-talk mailing list submissions to factor-talk@lists.sourceforge.net To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/factor-talk or, via email, send a message with subject or body 'help' to factor-talk-requ...@lists.sourceforge.net You can reach the person managing the list at factor-talk-ow...@lists.sourceforge.net When replying, please edit your Subject line so it is more specific than Re: Contents of Factor-talk digest... Today's Topics: 1. Re: displaying Lisp like nested lists (Iain Gray) 2. Re: displaying Lisp like nested lists (Bj?rn Lindqvist) 3. Re: displaying Lisp like nested lists (Iain Gray) 4. nested nil lists (Iain Gray) 5. Re: nested nil lists (Iain Gray) 6. Re: nested nil lists (Jon Harper) -- Message: 1 Date: Mon, 29 Jun 2015 16:49:03 +0100 From: Iain Gray iaing...@ednet.co.uk Subject: Re: [Factor-talk] displaying Lisp like nested lists To: factor-talk@lists.sourceforge.net Message-ID: 272b8268-5938-4c23-bdbc-0408c5d97...@ednet.co.uk Content-Type: text/plain; charset=us-ascii 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 ( list -- array ) [ dup list? [ deeplistarray ] when ] lmaparray ; IN: scratchpad 1 nil cons 2 nil cons nil cons nil cons cons deeplistarray . { { 1 } { { 2 } } } Hope that helps, Jon Jon On Mon, Jun 29, 2015 at 5:03 PM, Iain Gray iaing...@ednet.co.uk mailto:iaing...@ednet.co.uk wrote: that gave me { ~cons-state~ ~cons-state~ } On 29 Jun 2015, at 15:22, John Benediktsson mrj...@gmail.com mailto: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 mailto: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? -- 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 http://ad.doubleclick.net/ddm/clk/292181274;119417398;o ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net mailto:Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk 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___ http://ad.doubleclick.net/ddm/clk/292181274;119417398;o___ Factor-talk mailing list Factor-talk@lists.sourceforge.net mailto:Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk 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 http://ad.doubleclick.net/ddm/clk/292181274;119417398;o ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net
Re: [Factor-talk] nested nil lists
Maybe you already know, but factor doesn't use lists in the same capacity as scheme and other lisp-variants. Instead it uses sequences. So to construct a one-item sequence where the first element is f (~= nil): IN: scratchpad f 1array Or just use a literal: IN: scratchpad { f } 2015-07-03 11:14 GMT+02:00 Iain Gray iaing...@ednet.co.uk: in Scheme I can evaluate (list ‘()) to get ‘(()) as a nested null list Factor supplies nil (+nil+) but I can’t seem to get the above using cons, 1list etc. is this not the natural way to do this in Factor? -- Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- mvh/best regards Björn Lindqvist -- Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
[Factor-talk] nested nil lists
in Scheme I can evaluate (list ‘()) to get ‘(()) as a nested null list Factor supplies nil (+nil+) but I can’t seem to get the above using cons, 1list etc. is this not the natural way to do this in Factor? -- Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] nested nil lists
is nil nil cons ok? On 3 Jul 2015, at 10:14, Iain Gray iaing...@ednet.co.uk wrote: in Scheme I can evaluate (list ‘()) to get ‘(()) as a nested null list Factor supplies nil (+nil+) but I can’t seem to get the above using cons, 1list etc. is this not the natural way to do this in Factor? -- Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk