Implementation of http://codekata.com/kata/kata02-karate-chop/ with modifications