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:

(equal?
 (infixwalk
   '((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
"http://dept-info.labri.fr/~strandh/Teaching/MTP/Common/Strandh-Tutorial/indentation.html";
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?
   (infixwalk
       '( (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
http://click.libero.it/infostrada30gen07




_______________________________________________
Guile-user mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/guile-user



_______________________________________________
Guile-user mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/guile-user

Reply via email to