{"categories":[{"label":"Libraries","url":"https://skillfed.io/packages/category/software-development-libraries/4"}],"enrichment":{"capability":"Implements Lisp/Scheme-style cons operations (cons, car, cdr) for Python sequences, enabling functional list manipulation across lists, tuples, iterators, and OrderedDicts.","skillfed_tags":["functional-programming","symbolic-computation","lisp-scheme"],"use_cases":["Build functional data structures using cons pairs in symbolic or logic programming applications.","Perform pattern matching and unification on Python sequences using the unification integration.","Implement recursive list algorithms that rely on car/cdr decomposition in a Lisp-like style.","Work with OrderedDicts and other sequence types using uniform cons semantics.","Prototype or port Scheme/Lisp algorithms to Python while preserving their list-manipulation idioms."],"what_it_does":"The cons package brings Lisp and Scheme's classic cons-cell operations into Python, letting you build and decompose sequences using car (head), cdr (tail), and cons (prepend) functions. It works across Python's standard sequence types\u2014lists, tuples, iterators, and OrderedDicts\u2014while treating None as the empty list, following Scheme conventions. The package also integrates with the logical-unification library, enabling pattern matching and unification on cons structures.\n\nIt's designed for developers working with functional programming patterns or symbolic computation in Python. The implementation respects Python's sequence semantics while staying true to Lisp/Scheme behavior; for example, calling car or cdr on an empty sequence raises ConsError rather than returning nil. You can customize which types participate in cons operations by registering them with the MaybeCons and NonCons abstract base classes.","worth_installing":"Yes, if you need Lisp/Scheme-style cons operations for functional programming or symbolic computation. Install friction is minimal and maintenance is active. However, verify the license terms first\u2014the license status is unclear and must be confirmed before use in proprietary or copyleft-sensitive contexts."},"id":"cons","links":{"html":"https://skillfed.io/packages/cons","md":"https://skillfed.io/packages/cons.md","pypi":"https://pypi.org/project/cons/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2025-07-11","license_spdx":null,"license_treatment":"unclear","name":"cons","python_support":"supports_current","summary":"An implementation of Lisp/Scheme-like cons in Python."},"popularity":{"monthly_downloads":1277357,"position":4123,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"0.4.7"}
