Changeset 37309 in project


Ignore:
Timestamp:
02/28/19 04:12:25 (3 months ago)
Author:
dieggsy
Message:

Clarify ref definition, add register-getter-with-setter! documentation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/srfi-123

    r37308 r37309  
    1414
    1515Access value in {{object}} specified by {{field}}. If there is no such value,
    16 signal an error or return {{default}} if supplied. Note that this is an
    17 [[http://srfi.schemers.org/srfi-17/srfi-17.html|SRFI-17]]
     16signal an error.
     17
     18{{~}} is the same procedure as {{ref}}.
     19
     20If {{object}} is a sparse type, meaning its fields can be "empty" or
     21"unassigned" (such as a hashtable) and the requested field is empty, the value
     22of {{default}} is returned, if that argument is supplied, or an error is
     23signaled.
     24
     25Note that this is an [[http://srfi.schemers.org/srfi-17/srfi-17.html|SRFI-17]]
    1826{{getter-with-setter}}, so the value specified by {{field}} can be set with:
    1927
     
    3139This is also an [[http://srfi.schemers.org/srfi-17/srfi-17.html|SRFI-17]]
    3240{{getter-with-setter}}.
     41
     42<procedure>(register-getter-with-setter! type getter sparse?)</procedure>
     43
     44Registers a new type/getter/setter for use with {{ref}} or {{ref*}}.
    3345
    3446
Note: See TracChangeset for help on using the changeset viewer.