Quick and dirty implementation of basic algorithms in D