Skip to content

Latest commit

 

History

History
30 lines (19 loc) · 1 KB

README.md

File metadata and controls

30 lines (19 loc) · 1 KB

python-pairs

github action status

A SICP'ish Functional Pairs implemented in Python.

Install

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

This repository is created and maintained by the team and the community of Hexlet, an educational project. Read more about Hexlet.

See most active contributors on hexlet-friends.