before introducing Memoization
currying didn't help
bugfix
housekeeping
minPath with no pattern matching