Go implementation of djb's redo
