This advanced course will introduce you to the concept of monads in Python and teach you how to implement and compose them. You will explore the design patterns functors, monads, and their practical usage scenarios.
Overview
Syllabus
- Lesson 1: Introduction to Type Annotations in Python
- Annotate the Multiply Function
- Annotate the calculate_area Function
- Annotate the `print_greeting` Function
- Annotate the `square_numbers` Function
- Annotate the Boolean Function
- Type-Annotated String Filter
- Lesson 2: Advanced Typing in Python
- Find the First Negative Number Index
- Smart Email Filter with Advanced Typing
- Implement a Function with Optional[Union]
- Filter `None` Values from Dictionary with Advanced Typing
- Calculate Statistics with Tuple Return Type
- Annotate Function with Callable
- Creating a Multiplier Function with Currying and Annotations
- Lesson 3: Python Generics
- Create a Generic Queue Class
- Implement a Generic Container Class
- Create a Generic Pair Class
- Lesson 4: Functor Design Pattern in Python
- Transform Functor for List of Integers
- Applying Functor to Transform a 2D Grid in Python
- Defining a Filter Functor
- RGB Tuple Transform Functor
- Lesson 5: Understanding Monads
- Creating a ValueWithLogs Class and Functions
- Implementing Functor Transform for ValueWithLogs
- Implementing the Join and Mbind Methods for Monad