McMaster University
CAS 706

Assignment 1

Generic Quicksort. Write 3 different versions of quicksort (in each language), which explicitly:

  1. Sort a list of integers in ascending order
  2. Sorts a list of ``anything'' via an externally provided comparison function.
  3. Sorts a list of ``anything'' via an externally provided comparison function, and an externally provided partition function (which itself uses the comparison function).
Your code should also contain executable test cases for each version. Using a testing framework is preferable over doing this "by hand".

Your deliverable should contain a README that tells me how to run things. If possible, a Makefile, or some similar method of automation would be best.

The languages are: D or Rust, TypeScript, OCaml, Prolog.


Bonus



Sept. 2017