File size: 1,580 Bytes
7339b50
 
e485eac
 
 
 
 
 
 
 
 
48feff6
 
 
 
e9e13d8
 
 
 
d417768
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48c286d
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Changelog of the functional-programming course

## 2025-04-07

* the `apply` method of `Maybe` *Applicative* should return `None` when `fg` or `fa` is `None`
+ add `sequenceL` as a classmethod for `Applicative` and add examples for `Wrapper`, `Maybe`, `List`
+ add description for utility functions of `Applicative`
* refine the implementation of `IO` *Applicative*
* reimplement `get_chars` with `IO.sequenceL`
+ add an example to show that `ListMonoidal` is equivalent to `List` *Applicative*

## 2025-04-06

- remove `sequenceL` from `Applicative` because it should be a classmethod but can't be generically implemented

## 2025-04-02

* `0.1.0` version of notebook `06_applicatives.py`

## 2025-03-16

+ Use uppercased letters for `Generic` types, e.g. `A = TypeVar("A")`
+ Refactor the `Functor` class, changing `fmap` and utility methods to `classmethod`

    For example:

    ```python
    @dataclass
    class Wrapper(Functor, Generic[A]):
        value: A

        @classmethod
        def fmap(cls, f: Callable[[A], B], a: "Wrapper[A]") -> "Wrapper[B]":
            return Wrapper(f(a.value))

    >>> Wrapper.fmap(lambda x: x + 1, wrapper)
    Wrapper(value=2)
    ```

+ Move the `check_functor_law` method from `Functor` class to a standard function
- Rename `ListWrapper` to `List` for simplicity
- Remove the `Just` class
+ Rewrite proofs

## 2025-03-13

* `0.1.0` version of notebook `05_functors`

Thank [Akshay](https://github.com/akshayka) and [Haleshot](https://github.com/Haleshot) for reviewing

## 2025-03-11

* Demo version of notebook `05_functors.py`