On this page:
entry?
entry
entry-key
entry-value
7.3

4.1 Entries

 (require rebellion/collection/entry) package: rebellion

An entry is a key-value pair representing a mapping in a dictionary-like collection. Entries are semantically equivalent to pairs, but use the less generic and more readable names entry-key and entry-value. Use entries instead of pairs when working with dicitonary-like types, as a collection of entry? values has a clearer intended purpose than a collection of pair? values.

procedure

(entry? v)  boolean?

  v : any/c
A predicate for entries.

procedure

(entry k v)  entry?

  k : any/c
  v : any/c
Constructs an entry.

Examples:
> (entry "apple" 'red)

(entry "apple" 'red)

> (entry "banana" 'yellow)

(entry "banana" 'yellow)

procedure

(entry-key e)  any/c

  e : entry?
Returns the key of e.

Example:
> (entry-key (entry "apple" 'red))

"apple"

procedure

(entry-value e)  any/c

  e : entry?
Returns the value in e.

Example:
> (entry-value (entry "banana" 'yellow))

'yellow