(index ("ref" 0) ("~" 0) ("ref*" 974) ("register-getter-with-setter!" 1247))
(def (sig (procedure "(ref object field [default])" (id ref)) (procedure "(~ object field [default])" (id ~))) (p "Access value in " (tt "object") " specified by " (tt "field") ". If there is no such value, signal an error.") (p (tt "~") " is the same procedure as " (tt "ref") ".") (p "If " (tt "object") " is a sparse type, meaning its fields can be \"empty\" or \"unassigned\" (such as a hashtable) and the requested field is empty, the value of " (tt "default") " is returned, if that argument is supplied, or an error is signaled.") (p "Note that this is an " (link "http://srfi.schemers.org/srfi-17/srfi-17.html" "SRFI-17") " " (tt "getter-with-setter") ", so the value specified by " (tt "field") " can be set with:") (highlight scheme "(set! (ref object field) value)") (p "By default, works on " (int-link "srfi-69") " hash-tables, lists/pairs, strings, vectors, " (int-link "srfi-99") " records, " (int-link "srfi-4") " vectors, and " (int-link "box") " boxes."))
(def (sig (procedure "(ref* object field ...)" (id ref*))) (p "Access value specified by one or more " (tt "field") "s in nested " (tt "object") ".") (p "This is also an " (link "http://srfi.schemers.org/srfi-17/srfi-17.html" "SRFI-17") " " (tt "getter-with-setter") "."))
(def (sig (procedure "(register-getter-with-setter! type getter sparse?)" (id register-getter-with-setter!))) (p "Registers a new type/getter/setter for use with " (tt "ref") " or " (tt "ref*") "."))
