Functional programming in Python ebook


Martin McBride, 2019-08-08
Tags immutable, recursion, closure, iterator, reduce, comprehension, partial application, currying, functor, monad, itertools, functools
Categories book, functional programming

Buy now from Leanpub or Amazon.

Download a free preview.

Python's best kept secret is its built in support for functional programming. Even better, it allows functional programming to be blended seamlessly with procedural and object oriented coding styles. This book explains what functional programming is, how Python supports it, and how you can use it to write clean, efficient and reliable code.

The book covers the basics of functional programming including function objects, immutability, recursion, iterables, comprehensions and generators. It also covers more advanced topics such as closures, memoization, partial functions, currying, functors and monads. No prior knowledge of functional programming is required, just a working knowledge of Python.

Contents:

  • What is functional programming?
  • Objects, variables, and functions as objects.
  • Immutable objects.
  • Recursion.
  • Closures.
  • Iterators.
  • Transforming and reducing iterables.
  • Comprehensions.
  • Generators.
  • Partial application and currying.
  • Functors and monads.
  • itertools, functools and other useful libraries.

Buy now from Leanpub, or download a free preview.

Copyright (c) Axlesoft Ltd 2020