8000 Update README.md · bitnom/functional-jargon-python@02bdfc8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 02bdfc8

Browse files
authored
Update README.md
1 parent 490e489 commit 02bdfc8

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Functional Programming Jargon
22

3+
[![Build Status](https://github.com/dry-python/functional-jargon-python/workflows/test/badge.svg?event=push)](https://github.com/dry-python/functional-jargon-python/actions?query=workflow%3Atest)
4+
35
Functional programming (FP) provides many advantages, and its popularity has been increasing as a result. However, each programming paradigm comes with its own unique jargon and FP is no exception. By providing a glossary, we hope to make learning FP easier.
46

57
This is a fork of [Functional Programming Jargon](https://github.com/jmesyou/functional-programming-jargon).
@@ -180,7 +182,7 @@ You can also use `functools.partial` to partially apply a function in Python:
180182
# TODO
181183
```
182184

183-
Partial application helps create simpler functions from more complex ones by baking in data when you have it. [Curried](#currying-todo) functions are automatically partially applied.
185+
Partial application helps create simpler functions from more complex ones by baking in data when you have it. [Curried](#currying) functions are automatically partially applied.
184186

185187

186188
## Currying
@@ -204,6 +206,7 @@ can also take several of arguments instead of just a single argument:
204206

205207
```python
206208
>>> assert takes_three_args(1, 2)(3) == 6
209+
>>> assert takes_three_args(1)(2, 3) == 6
207210
>>> assert takes_three_args(1, 2, 3) == 6
208211
```
209212

@@ -251,6 +254,7 @@ Continuations are often seen in asynchronous programming when the program needs
251254
# TODO
252255
```
253256

257+
254258
## Side effects
255259

256260
A function or expression is said to have a side effect if apart from returning a value,
@@ -267,6 +271,7 @@ numbers = []
267271
numbers.append(1) # mutates the `numbers` array
268272
```
269273

274+
270275
## Purity
271276

272277
A function is pure if the return value is only determined by its
@@ -287,6 +292,7 @@ As opposed to each of the following:
287292
... return first + second
288293
```
289294

295+
290296
## Idempotent
291297

292298
A function is idempotent if reapplying it to its result does not produce a different result:
@@ -299,7 +305,7 @@ A function is idempotent if reapplying it to its result does not produce a diffe
299305

300306
## Point-Free Style (TODO)
301307

302-
Writing functions where the definition does not explicitly identify the arguments used. This style usually requires [currying](#currying-todo) or other [Higher-Order functions](#higher-order-functions-hof-todo). A.K.A Tacit programming.
308+
Writing functions where the definition does not explicitly identify the arguments used. This style usually requires [currying](#currying) or other [Higher-Order functions](#higher-order-functions-hof-todo). A.K.A Tacit programming.
303309

304310
```python
305311
# TODO

0 commit comments

Comments
 (0)
0