An open API service indexing awesome lists of open source software.

https://github.com/hexlet-components/python-pairs

A SICP'ish Functional Pairs implemented in Python
https://github.com/hexlet-components/python-pairs

python3 sicp typed-python

Last synced: about 2 months ago
JSON representation

A SICP'ish Functional Pairs implemented in Python

Awesome Lists containing this project

README

          

# python-pairs

[![github action status](https://github.com/hexlet-components/python-pairs/workflows/Python%20CI/badge.svg)](https://github.com/hexlet-components/python-pairs/actions)

A SICP'ish Functional Pairs implemented in Python.

## Install

```shell
pip install hexlet-pairs
```

## Usage

from hexlet import pairs
p = pairs.cons(42, 'foo')
pairs.is_pair(p) # True
pairs.car(p) # 42
pairs.cdr(p) # 'foo'
print(pairs.to_string(p)) # cons(42, 'foo')

---

[![Hexlet Ltd. logo](https://raw.githubusercontent.com/Hexlet/assets/master/images/hexlet_logo128.png)](https://hexlet.io?utm_source=github&utm_medium=link&utm_campaign=python-pairs)

This repository is created and maintained by the team and the community of Hexlet, an educational project. [Read more about Hexlet](https://hexlet.io?utm_source=github&utm_medium=link&utm_campaign=python-pairs).

See most active contributors on [hexlet-friends](https://friends.hexlet.io/).