Skip to content

Instantly share code, notes, and snippets.

View paulbuis's full-sized avatar
💭
Teaching a Programming Language class at Ball State University

Paul Buis paulbuis

💭
Teaching a Programming Language class at Ball State University
View GitHub Profile
@paulbuis
paulbuis / stacks.d
Created May 21, 2014 17:05
Example code in D for imlementing a Stack template with a non-GC'ed linked list that minimizes invocations of "new"
module stacks;
class Stack(T) {
private StackNode!T* front = null;
~this() {
while (!empty()) {
pop();
}
}