Primitives
increment(x: int) -> int
Increments x by 1.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x |
int
|
The value to increment. |
required |
Returns:
| Type | Description |
|---|---|
int
|
The incremented value. |
Source code in src/funcs/primitives.py
6 7 8 9 10 11 12 13 14 15 | |
decrement(x: int) -> int
Decrements x by 1.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x |
int
|
The value to decrement. |
required |
Returns:
| Type | Description |
|---|---|
int
|
The decremented value. |
Source code in src/funcs/primitives.py
18 19 20 21 22 23 24 25 26 27 | |
is_even(x: int) -> bool
Checks if x is even.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x |
int
|
The value to check. |
required |
Returns:
| Type | Description |
|---|---|
bool
|
Whether |
Source code in src/funcs/primitives.py
30 31 32 33 34 35 36 37 38 39 | |
is_odd(x: int) -> bool
Checks if x is odd.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x |
int
|
The value to check. |
required |
Returns:
| Type | Description |
|---|---|
bool
|
Whether |
Source code in src/funcs/primitives.py
42 43 44 45 46 47 48 49 50 51 | |