A scheme, implemented in java, because I can.