Unnest your mess with 'and'

2015-08-22 Thread Erik Gustafson
Hi list, I was thinking about some of the things brought up in the last thread, 'The `if-let` construct', notably Mike's comment about certain idioms being useless within the PicoLisp feature set. Now I like Clojure's '->' just as much as the next Clojure enthusiast, but I agree we don't need it i

RE: Unnest your mess with 'and'

2015-08-22 Thread andreas
Hi Erik Thanks for writing this awesome article, your humour made it a very joyful read! I actually found that technique myself too, and used it in certain cases, its just perfect when you have multiple sequential things to do but you want to cancel execution when one of it fails. When using th

RE: Unnest your mess with 'and'

2015-08-22 Thread andreas
Of course you can also use (or) to achieve the opposite - stop when a call or evaluation returns something (not NIL). This way you have actually a very cheap implementation of the Design Pattern (GoF) 'chain of responsibility', when one function successfully handles the required case, stop there

Re: Unnest your mess with 'and'

2015-08-22 Thread Erik Gustafson
Hey Beneroth, Thanks for the kind words, my pleasure to share with you all. Of course you can also use (or) to achieve the opposite - stop when a call > or evaluation returns something (not NIL). > This way you have actually a very cheap implementation of the Design > Pattern (GoF) 'chain of resp

pilrc?

2015-08-22 Thread Erik Gustafson
I feel like I've seen the answer to this somewhere in the past when I was just a baby PicoLisper, but can't seem to find it now. Anyway, what's the canonical way to customize the default 'pil' environment? I'd like to have some of my own utilities and other goodies loaded when I start up. Can I jus

RE: pilrc?

2015-08-22 Thread andreas
> what's the canonical way to customize the default 'pil' environment? > I'd like to have some of my own utilities and other goodies loaded when I > start up. > Can I just stick the necessary calls to (load) in .pilrc? :) I'm not aware of any .pilrc mechanics, search in mailing list also yields

Re: pilrc?

2015-08-22 Thread Alexander Burger
Hi Erik + Andreas, first of all, thanks Erik for the nice "Unnest" article! > > what's the canonical way to customize the default 'pil' environment? > > I'd like to have some of my own utilities and other goodies loaded when I > > start up. > > Can I just stick the necessary calls to (load) in