[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: infixorder

From: Jon Wilson
Subject: Re: infixorder
Date: Tue, 30 Jan 2007 09:46:41 -0600
User-agent: Thunderbird (X11/20070103)

Hi Oriana,
Well, since you're learning scheme, here is a tip: Use the conventional indentation and such. It will seem weird and you will find yourself counting parens at first, but quickly you will get used to it, and begin to not even see the parens. Your code snippet should be written:

   '((a) b ((c) d (e))))
 '(b a d c e))
=> #t

That little => at the end means "the above (or left) expression evaluates to the expression on the right."

The indentation rules for Common Lisp at
apply more or less to scheme as well. As that page says, indentation rules are /not/ a matter of personal taste, but a matter of /shared culture/.
Best of luck with your homework,
Jon Wilson

oriana paro wrote:
Hi. I'm learning scheme (Guile) and I have some problem with the infix order 
walk in a tree...
I want to write a function infixwalk that walks though a tree in infix order (left tree - node - righ tree) so that the call (equal?
       '( (a) b ( (c) d (e) ) )
    '(b a d c e)
returns #t. Anyone can help me?? Thanks in advance.

Passa a Infostrada. ADSL e Telefono senza limiti e senza canone Telecom

Guile-user mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]