0

How to use associative arrays or Hash tables in Chicken Scheme?

I'm looking for a data structure that supports (near) O(1) access to data based on keys, which should work like Java's HashMap or Python's dict data structures in Chicken Scheme.
There seem to be eggs that implement that functionality, but I'd rather use something more standard.

Apparently, there seems to be an effort to define a standard library with Scheme R6RS, but I'm not sure if that's a viable option for Chicken.

4

1 回答 1

3

Chicken Scheme 通过实现SRFI-69SRFI-90原生支持高效的哈希表,请查看文档。它还支持关联列表,但这只是构建和搜索普通对列表的约定,它们并不意味着允许有效的搜索。

于 2016-03-15T02:37:52.227 回答