Removes partial functions (Fixes #4, Fixes #2)
Provide memoisation as a separate method (Fixes #3)
Merge.