Skip to content

Files

Latest commit

12cff41 · Aug 16, 2024

History

History

14-functional-programming

This repo contains examples and tools related to functional programming in Python.

Files

lambda_functions.py

This file demonstrates the use of lambda functions in Python. It includes examples for:

  • Adding two numbers
  • Checking if a number is even
  • Squaring a number

functional_tools.py

This file includes several functional programming tools:

  • square_numbers(): Applies the square function to each element in a list using map().
  • filter_even(): Filters out even numbers from a list using filter().
  • sum_numbers(): Computes the sum of numbers in a list using reduce().