Git Product home page Git Product logo

scheme-hashtable's Introduction

scheme-hashtable

An implementation of a hash table written in portable Scheme

Copyright

scheme-hashtable is free software licensed under the GNU General Public License version 3 or later.

Portability

scheme-hashtable should run in any R4RS+ conformant Scheme.

scheme-hashtable is known to work on:

Example

(define foo (hash-tableq 'foo "foo" 'bar "bar"))
(hash-table-ref foo 'foo) ;; ===> (foo . "foo")
(hash-table-ref foo 'bar) ;; ===> (bar . "bar")
(hash-table-set! foo 'bar "baz")
(hash-table-ref foo 'bar) ;; ===> (bar . "baz")

API Reference

Procedure: (make-hash-table)

Procedure: (make-hash-tableq)

Procedure: (make-hash-tablev)

Create and return a new hash table using equal?, eq? or eqv? respectively for comparison of keys. All hash tables are mutable. Optionally takes a size as an argument.

Procedure: (hash-table? obj)

Return #t if obj is a hash table.

Procedure: (hash-table-equal? obj)

Procedure: (hash-table-eq? obj)

Procedure: (hash-table-eqv? obj)

Return #t if obj is a hash table using equal?, eq? or eqv? respectively for comparison of keys.

Procedure: (hash-table-set! ht key val)

Set key in the hash table ht to val.

Procedure: (hash-table-ref ht key)

Lookup the value of key in the hash table ht. If ht has key, return the pair of key and the value, else return #f.

Procedure: (hash-table-delete! ht key)

Remove key from the hash table ht.

Procedure: (alist->hash-table alist)

Procedure: (alist->hash-tableq alist)

Procedure: (alist->hash-tablev alist)

Convert the associative list alist to a hash table using equal?, eq? or eqv? respectively for comparison of keys.

Procedure: (hash-table->alist ht)

Convert the hash table ht to an associative list.

Procedure: (hash-table args ...)

Procedure: (hash-tableq args ...)

Procedure: (hash-tablev args ...)

Construct a hash table using equal?, eq? or eqv? respectively for comparison of keys.

Procedure: (hash-table-aproc ht)

Get assoc, assq or assv depending on which procedure the hash table ht uses.

Procedure: (hash-table-pred ht)

Get the predicate the hash table ht uses for comparison of keys.

Procedure: (hash-table-copy ht)

Create a copy of the hash table ht.

Procedure: (hash-table-set ht args ...)

Create a copy of the hash table ht and set the keys to the values.

Procedure: (hash-table-delete ht keys ...)

Create a copy of the hash table ht and delete the keys.

scheme-hashtable's People

Contributors

jonathan50 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.