Skip to content

rjdscott/PyFP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 

Repository files navigation

PyFP

Functional Programming in Python

Getting started

Create a project folder on your local machine, if you haven't done so already. Clone this repository, create a virtual environment and install required packages.

$ mkdir python-fp
$ cd python-fp
$ virtualenv .env
(.env) $ source .env/bin/activate
(.env) $ pip install -r requirements.txt

Now, we need to start the jupyter notebook kernel, which will open your default web browser in the current directory and you will be able to interact with the nootebooks.

$ (.env) $ jupyter notebook

What this repo covers

The exapmles and content within this repository aims to introduce beginner to intermediate level python programmers to the concepts of functional programming. Although python is not a functinoal programming language, you can still take a more functional approach to writing your code which will make it easier to maintain, and be interesting to leant at the same time.

Topics covered:

  • OOP vs FP
  • lambda expressions vs list comprehensions
  • filter, map, reduce
  • FP best practices

Helpful resources

Helpful resources