{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "cfbd7bf2",
   "metadata": {},
   "source": [
    "# Functional Programming"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f5019bb5",
   "metadata": {},
   "source": [
    "Functional programming is a style of writing programs as transformations from inputs to outputs. Python is not a purely functional language, but it includes functional tools that help you write concise, reusable, and testable code. This chapter introduces those tools and shows when they make Python code clearer.\n",
    "\n",
    "**Learning goals:** By the end of this chapter you will be able to:\n",
    "\n",
    "- Identify pure functions and avoid unnecessary side effects\n",
    "- Use immutability by returning new values instead of mutating existing objects\n",
    "- Treat functions as first-class values that can be passed to and returned from other functions\n",
    "- Use lambda functions with `map()`, `filter()`, and `sorted()`\n",
    "- Write list, dictionary, and set comprehensions with conditions\n",
    "- Build decorators to add reusable behavior to functions\n",
    "- Apply recursion to problems with a natural self-similar structure\n",
    "- Use context managers and selected `functools` utilities in practical programs\n",
    "\n",
    "<h2>Chapter flow</h2>\n",
    "\n",
    "```{tableofcontents}\n",
    "```"
   ]
  }
 ],
 "metadata": {
  "language_info": {
   "name": "python"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
