aspis.common.add

aspis.common.add(a, b, /)

Curried addition function.

Adds two numbers together. Can be partially applied.

Parameters:
  • a (number) – The first number to add.

  • b (number) – The second number to add.

Returns:

The sum of a and b.

Return type:

number

Example

>>> add(2, 3)
5
>>> add(2)(3)
5
>>> add_five = add(5)
>>> add_five(10)
15