I fixed the page to address both Wesley's and Henry's comments. Hopefully the new "implementation using functions and references" in terms of a pair of functions instead of a curried function is clearer too.