On this page:
optional
present
absent
option-case
8.12

4.5 Optional Values🔗ℹ

type

optional

An optional value encapsulates a result that either is present or absent. This data type is particularly useful for the return value of element lookups in collections, or for procedures that have a trivial notion of failure.

constructor

(present value)

Container for a value.

constructor

absent

Represents a lack of a value.

procedure

(option-case opt    
  #:present present-proc    
  #:absent absent-proc)  any/c
  opt : option?
  present-proc : (λ/c any/c  any/c)
  absent-proc : (λ/c  any/c)