CS322, Principles of Programming Languages

I really enjoyed the survey of programming topics and paradigms this class offered.

Emulation of multidimensional arrays in C

mdarray.c

mdarray.h

testmain.c

Quicksort in C

Emulating recursion using only if and goto for control, an incredibly fast sorting method.

quicksort.c

Diamond Inheritance in C

Emulating diamond inheritance in C with function pointers.

PG3.c

PG3.h

Calculating tree skew in Lisp

I wish we had spent more time with Lisp in this class; this program computes the “skew” of a tree, a measure of its imbalance.

skew.lisp

skew.in

Mergesort in Prolog

Prolog is weird.

mergesort.pl
Share