CSci 555-1: Functional Programming
Spring 2016

Assignment #2
Due Tuesday, 8 March, 2016, 11:59 p.m.

Extend the List module developed in the notes on Functional Data Structures (source code) to include the following Scala functions.

A general tree is a data structure in which each node has zero or more subtrees. Given the following definitions for a Scala data type GTree

    sealed trait GTree[+A]
    case class Leaf[+A](value: A) extends GTree[A]
    case class Gnode[+A](gnode: List[GTree[A]]) extends GTree[A]
define the following functions (using functions from the extended List module as needed).

Design appropriate tests for your functions and test them thoroughly.

Document your program appropriately.

Submit the source code and documentation for your program and test driver, any needed instructions on how to run the program, and appropriate test output to Blackboard. Be sure to identify yourself in the materials turned in.


UP to CSci 555 Assignments? /


Copyright © 2016, H. Conrad Cunningham
Last modified: Sat Feb 27 20:47:12 CST 2016