Skip to content

Commit 8887f0a

Browse files
committed
doc(README): cleanliness for
1 parent 4be298e commit 8887f0a

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Library for dynamic functional programming and more.
33

44
Enter this command and go to the [documentation](https://github.com/TheArtur128/Act/blob/main/DOCS.md):
55
```
6-
pip install act4==3.1.0
6+
pip install act4
77
```
88

99
### Overview
@@ -28,9 +28,9 @@ WithDivision = type(division=D)
2828
Result = WithMultiplication[N] & WithDivision[N]
2929

3030

31-
@fbind_by(... |then>> on(None, bad("undefined")))
31+
@fbind_by(... |then>> on(None, bad("something is missing")))
3232
@do(maybe, optionally, for_input=optionally)
33-
def main(do: Do, a: WithNumber[Optional[int]], b: WithNumber[Optional[int]]) -> Result[int]:
33+
def func(do: Do, a: WithNumber[Optional[int]], b: WithNumber[Optional[int]]) -> Result[int]:
3434
maybe, optionally = do
3535

3636
first_number = optionally.same(a.number)
@@ -42,16 +42,16 @@ def main(do: Do, a: WithNumber[Optional[int]], b: WithNumber[Optional[int]]) ->
4242
return Result(multiplication, division)
4343

4444

45-
# As a result, `main` has this type.
46-
main: Callable[
45+
# As a result, `func` has this type.
46+
func: Callable[
4747
[Optional[WithNumber[Optional[int]]], Optional[WithNumber[Optional[int]]]],
4848
Result[int] | bad[str],
4949
]
5050

51-
assert main(WithNumber(16), WithNumber(2)) == obj(multiplication=32, division=8)
52-
assert main(WithNumber(16), WithNumber(0)) == bad("division by zero")
53-
assert main(WithNumber(16), WithNumber(None)) == bad("undefined")
54-
assert main(WithNumber(16), None) == bad("undefined")
51+
assert func(WithNumber(16), WithNumber(2)) == obj(multiplication=32, division=8)
52+
assert func(WithNumber(16), WithNumber(0)) == bad("division by zero")
53+
assert func(WithNumber(16), WithNumber(None)) == bad("something is missing")
54+
assert func(WithNumber(16), None) == bad("something is missing")
5555

5656

5757
class RawResult:

0 commit comments

Comments
 (0)