scsh-users
[Top] [All Lists]

Re: slib support?

To: scsh@martigny.ai.mit.edu
Subject: Re: slib support?
From: spot@goober.graphics.cs.cmu.edu (Scott Draves)
Date: 11 Jul 1996 16:33:15 GMT
Organization: Carnegie-Mellon University, School of Computer Science

Rob> ... When I need to use some feature of slib (e. g. hash tables)


s48 has hash tables in the big-scheme module.  from doc/big-scheme.txt:


(MAKE-TABLE) => <table>
(MAKE-STRING-TABLE) => <string-table>
  Make a new, empty table.  MAKE-TABLE returns a table that uses EQ?
  for comparing keys and an ad-hoc hash function.  String tables uses
  strings for keys.

(MAKE-TABLE-MAKER <comparison-procedure> <hash-procedure>) => <procedure>
  Returns a procedure of no arguments that makes tables that use the
  given comparison and hash procedures.
  (<comparison-procedure> <key1> <key2>) => <boolean>
  (<hash-procedure> <key>) => <non-negative-integer>

(TABLE? <x>) => <boolean>
  True if <x> is a table.

(TABLE-REF <table> <key>) => <x>
  Return the value for <key> in <table>, or #F if there is none.
  <key> should be of a type appropriate for <table>.

(TABLE-SET! <table> <key> <value>) => <undefined>
  Make <value> be the value of <key> in <table>.  <key> should be of a
  type appropriate for <table>.

(TABLE-WALK <procedure> <table>) => <undefined>
  Apply <procedure>, which must accept two arguments, to every
  associated key and value in <table>.
--
                                balance
                                equilibrium
                                death

http://www.cs.cmu.edu/~spot
spot@cs.cmu.edu

<Prev in Thread] Current Thread [Next in Thread>