semvec/pypi-packages huggingface dataset:
sayori 1.0.6
Compose functions using pipeline notation.
Requires Python: >=3.9

<div align=center>
  <br>
  <img width=60% src='https://raw.githubusercontent.com/oruwmztbnz4q/sayori/main/images/sayori.svg'></img>
  <br>
</div>


# Sayori

Sayori is a tiny library for composing [pure functions](https://en.wikipedia.org/wiki/Pure_function) using pipeline notation. If `f` and `g` are functions then `f | g` is a function such that `(f | g)(x) = g(f(x))`.


## Installation

```sh
pip install sayori
```


## Usage

Sayori exports a simple decorator called `Composable` which implements the pipe operator. It can be used as follows:

```py
from sayori import Composable
```

Create two composable functions...

```py
f = Composable(lambda x: x + 1)

g = Composable(lambda x: x * 2)
```

Compose them...

```py
h = f | g
```

Apply the composite...

```py
h(2)  # returns 6
```
six_function_calculator 0.0.3
six function calculator

six_function_calculator
-----------------------

This is a simple calculator. 
This calculator starts with an initial value of 0 within memory. It stores the results of previous calculations within memory, subsequent calculations use the current value stored in memory. 


This calculator performs 6 functions

1. Addition of a maximum of two numbers at a time
2. subtraction of a maximum of two numbers at a time
3. Mutiplication of a maximum of two numbers at a time
4. Division involving two numbers
5. Finding the nth root of a number
6. Reseting the calculator's working memory to 0

Licence: MIT (see LICENCE)

Installing this package 
-----------------------

pip install six_function_calculator

Example
-------


from six_function_calculator import Calculator 

-Creating an instance of Calculator:

calculator1 = Calculator() 

-Using this instance of Calculator 

calculator1.add(0) -> 0

calculator1.add(2) -> 2

calculator1.add(4) -> 6