Expand..

Q&A's, tips, howto's

Expand..

Postby derek » Wed Jun 22, 2016 2:01 pm

Maybe I'm doing something wrong but I can't get expand to work..

(set 'x 2 'a '(d e)) ; from the examples

(expand '(a x(b c x) 'x 'a))

For me this just returns the first list I typed. But I'm just using this on the console, not in any macros.. is this possible??

Many thanks.
derek
 
Posts: 2
Joined: Wed Jun 22, 2016 1:52 pm
Location: Limoges, France

Re: Expand..

Postby newBert » Wed Jun 22, 2016 3:32 pm

derek wrote:Maybe I'm doing something wrong but I can't get expand to work..

(set 'x 2 'a '(d e)) ; from the examples

(expand '(a x(b c x) 'x 'a))

For me this just returns the first list I typed. But I'm just using this on the console, not in any macros.. is this possible??

Many thanks.


In the example, we have : (expand '(a x (b c x)) 'x 'a) which returns -> ((d e) 2 (b c 2)).
But you wrote (expand '(a x(b c x) 'x 'a)) ...
BertrandnewLISP v.10.7.5 64-bit on Linux (Peppermint 9)
newBert
 
Posts: 138
Joined: Fri Oct 28, 2005 5:33 pm
Location: France

Re: Expand..

Postby derek » Thu Jun 23, 2016 8:52 am

Many thanks - I figured it out shortly after posting. I used the neglook examples and it worked, so I guessed it was my crappy typing..

Newlisp is great - many thanks for this language. I never managed to get quite good enough at lisp and scheme, but with newlisp I should be vaguely useful for something..

:)
derek
 
Posts: 2
Joined: Wed Jun 22, 2016 1:52 pm
Location: Limoges, France

Re: Expand..

Postby newBert » Fri Jun 24, 2016 4:24 pm

derek wrote: I never managed to get quite good enough at lisp and scheme, but with newlisp I should be vaguely useful for something..

:)


I myself tried some Lisp(s) and many Scheme(s), and other scripting languages too, like Python, Perl or Ruby, but I'm definetly not able to manage with them, and at the end I come back again and again to NewLISP, (and Lua, equally placed with NewLISP as my favorite languages) :)
BertrandnewLISP v.10.7.5 64-bit on Linux (Peppermint 9)
newBert
 
Posts: 138
Joined: Fri Oct 28, 2005 5:33 pm
Location: France


Return to newLISP in the real world

Who is online

Users browsing this forum: ralph.ronnquist and 1 guest