Spaces:
Running
Running
métaboulie
Srihari Thyagarajan
commited on
Update functional_programming/06_applicatives.py
Browse filesCo-authored-by: Srihari Thyagarajan <[email protected]>
functional_programming/06_applicatives.py
CHANGED
@@ -830,7 +830,7 @@ def _(mo):
|
|
830 |
|
831 |
Our original motivation for applicatives was the desire to generalise the idea of mapping to functions with multiple arguments. This is a valid interpretation of the concept of applicatives, but from the three instances we have seen it becomes clear that there is also another, more abstract view.
|
832 |
|
833 |
-
|
834 |
"""
|
835 |
)
|
836 |
return
|
|
|
830 |
|
831 |
Our original motivation for applicatives was the desire to generalise the idea of mapping to functions with multiple arguments. This is a valid interpretation of the concept of applicatives, but from the three instances we have seen it becomes clear that there is also another, more abstract view.
|
832 |
|
833 |
+
The arguments are no longer just plain values but may also have effects, such as the possibility of failure, having many ways to succeed, or performing input/output actions. In this manner, applicative functors can also be viewed as abstracting the idea of **applying pure functions to effectful arguments**, with the precise form of effects that are permitted depending on the nature of the underlying functor.
|
834 |
"""
|
835 |
)
|
836 |
return
|