Coder Profile - Show off your skills, get a coder profile.
 
 
 
The Author
closure
david
Send A Message
Rating
8.00
out of 10
( 1 Ratings )
Please login to rate source codes.

Click here to register a free account with us.
General Details
Scheme
Posted 333 Days Ago
272 Views
Received 1 Rating
More Codes By This Author
Solving the N-Queens-Prob...
Recursive Lambdas with th...
down the tree
simple constraint problem...
Articles By This Author
N-Queens-Series Part I (O...

down the tree


Description
This piece of code was made when i helped a friend of mine in his university class on datastructures.
It's a very simple imlementation of binary-trees in scheme. The task was the following:
given tow lists holding the nodes from an inorder and and a preorder traversal of an unknown
tree, the code shall be able to construct this unknown tree from the lists given.

That's what (from-in-pre-order) does.
Additionally the code provides a generic procedure (traverse-tree) that is to be passed a tree
and a procedure implementing the order of traversal. There is pre,post and inorder predefined
as such a procedure.

That's all there is to it. I bet the code can be improved, feel free to do so :)
Technical
You need a working scheme-interpreter
Source Code
Comments
Please login to post comments.
 
Cinjection     Posted 123 Days Ago
 
 
Ah. I see. Thanks.
 
closure     Posted 123 Days Ago
 
 
Hi cinjection,
srfi-1 is the first of the scheme requests for implementions. Those are basically
libraries.
This particular library provides list-procedures. See: http://srfi.schemers.org/
 
Cinjection     Posted 123 Days Ago
 
 
Good stuff. I made something similar in Scheme as well.

What is (use srfi-1)? I've seen it all you Scheme code.
 
Webcopper     Posted 198 Days Ago
 
 
wow... I can't understand it.... it's... totally unfamiliar... looks cool
though :)
Page 1 of 1
More "Scheme" Source Codes By This Author
Recently Posted "Scheme" Source Codes
Recently Rated "Scheme" Source Codes
 
 
Latest News About Coder Profile
Coder Profile Poll
How often do you write code on average per week?

< 5 hours
5 to 20 hours
21 to 30 hours
31 to 40 hours
> 40 hours


please login to cast your vote
and see the results of this poll
Latest Coder Profile Changes
Coder Profile was last updated
5 Days Ago
Official Blog :: Make A Donation :: Credits :: Contact Me
Terms & Conditions :: Privacy Policy :: Documents :: Wallpapers
Version 1.46.00
Copyright © 2007 - 2008, Scott Thompson, All Rights Reserved