HN user

samasblack

189 karma

Mathematics Postdoc

Posts3
Comments8
View on HN

I like the way the Functional Programming HOWTO in the Python docs (https://docs.python.org/3/howto/functional.html#small-functi...) puts it:

  Fredrik Lundh once suggested the following set of rules for refactoring uses of lambda:

  1. Write a lambda function.
  2. Write a comment explaining what the heck that lambda does.
  3. Study the comment for a while, and think of a name that captures the essence of the comment.
  4. Convert the lambda to a def statement, using that name.
  5. Remove the comment.

A nice foundational textbook to start with is Michael Spivak's text "Calculus." This text is fairly conversational, it motivates its concepts well with many examples, and it will help you build a strong foundation in writing proofs and reasoning mathematically.

As others have said, it might be helpful to have a friend or two read with you so you can answer each other's questions. Also, make sure you do a ton of exercises!