Newsgroups: comp.lang.scheme
From: Kyn@waichung.demon.co.uk (Kyn Wai Chung)
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!news.mathworks.com!udel!gatech!howland.reston.ans.net!news.sprintlink.net!pipex!peernews.demon.co.uk!waichung.demon.co.uk!Kyn
Subject: Re:help required.
Distribution: world
Organization: Myorganisation
Reply-To: Kyn@waichung.demon.co.uk
X-Newsreader: Newswin Alpha 0.6
Lines:  27
X-Posting-Host: waichung.demon.co.uk
Date: Thu, 2 Mar 1995 13:44:30 +0000
Message-ID: <886002892wnr@waichung.demon.co.uk>
Sender: usenet@demon.co.uk


As i am learning Scheme in my spare time, i am not that well versed in 
it yet.One of the problems i have encounterd is how to write a program 
based on a algorithm e.g.  
                        
               do for i = 1 to vector-length
               do for j = vector-length down-to i
               if vector(j - 1) > vector(j) then
               begin ; swap the elements
               temp = vector(j - 1)
               vector(j - 1) = vector(j)
               vector(j) = temp
               end
               endif
               enddo
               enddo

this was taken from a book i was given, it apparently is an algorithm for 
sorting the elements of a vector into ascending order.As i have no idea 
on how to go about constructing the program, can anybody help me get 
started.Please keep in mind that i am fairly new to Scheme and to
computing on the whole.Anyway thanks for taking the trouble to read 
this posting and any help is appreciated.

Kyn Wai Chung

