Fix typos in function lesson

Like it says on the tin: just fixing a few typos I noticed while browsing the book.