CS 1323 Section 30, Spring 1997

Individual Project 1
Due Wednesday, January 22, 3:30pm

Using Canned Software to Arrange Names in Alphabetical Order


import SequenceUtilities(quicksort)
namesDisplay =
  unlines[
    "John Peterson",
    "Kevin Hammond",
    "Alastair Reid",
    "Mark Jones",
    "Paul Hudak",
    "Brian Boutel",
    "Andrew Gordon",
    "John Hughes",
    "Simon PeytonJones",
    "Philip Wadler",
    "Thomas Johansson",
    "Lennart Augustsson",
    "Warren Burton",
    "Joseph Fasel"]
swapNames = unwords . reverse . words
swapAllNamesInSequence names = [swapNames name | name <- names]
alphabeticalDisplay =
  (unlines . swapAllNamesInSequence . quicksort .
                       swapAllNamesInSequence . lines) namesDisplay


CS 1323 Section 30 - Fundamentals of Computer Programming - Spring 1997
Instructor: Rex Page (Email: page@ou.edu)
Up to: Welcome Page ~~~ Up to: University of Oklahoma ~~~ Go to: Next Semester ~~~ Go to: Previous Semester