abbrev

  1. abbrev
    1. Description
    2. Authors
    3. Repository
    4. API
      1. abbrev
    5. Examples
    6. Changelog
    7. License

Description

Calculate the set of unique abbreviations for a list of strings. This library is a port of the equivalent Ruby library.

Authors

Original Snow library: Peter Lane

Chicken port: Lilianna Smólska

Repository

https://git.linuxposting.xyz/afiw/chicken-abbrev

API

abbrev

[procedure] (abbrev strings #!optional prefix)

Returns an association list mapping unique abbreviations to the matching string. If prefix is present, only includes abbreviations that have that prefix.

Examples

(import (chicken base) (abbrev))
(define abbrevs (abbrev '("scheme" "scala" "lisp")))
(alist-ref "sch" abbrevs string=?) ; => "scheme"

Changelog

License

SPDX-License-Identifier: LicenseRef-OWL-0.9.4

SPDX-FileCopyrightText: 2017 Peter Lane

SPDX-FileCopyrightText: 2025 afiw <afiw@linuxposting.xyz>

See COPYING file for full license text.