source: project/wiki/eggref/4/srfi-123 @ 37306

Last change on this file since 37306 was 37306, checked in by dieggsy, 21 months ago

Add page for srfi-123

File size: 2.3 KB
Line 
1[[tags: egg]]
2
3[[toc:]]
4
5== srfi-69
6
7Generic accessor and modifier operators. For more information, see
8[[http://srfi.schemers.org/srfi-123/srfi-123.html|SRFI-123]].
9
10=== Procedures
11
12<procedure>(ref object field [default])</procedure>
13<procedure>(~ object field [default])</procedure>
14
15Access value in {{object}} specified by {{field}}. If there is no such value,
16signal an error or return {{default}} if supplied. Note that this is an
17[[http://srfi.schemers.org/srfi-17/srfi-17.html|SRFI-17]]
18{{getter-with-setter}}, so the value specified by {{field}} can be set with:
19
20<enscript highlight=scheme>
21(set! (ref object field) value)
22</enscript>
23
24By default, works on [[srfi-69]] hash-tables, lists/pairs, strings, vectors,
25[[srfi-99]] records, [[srfi-4]] vectors, and [[box]] boxes.
26
27<procedure>(ref* object field ...)</procedure>
28
29Access value specified by one or more {{field}}s in nested {{object}}.
30
31This is also an [[http://srfi.schemers.org/srfi-17/srfi-17.html|SRFI-17]]
32{{getter-with-setter}}.
33
34
35=== Author
36
37Original implementation by Taylan Ulrich Bayırlı/Kammer, now maintained by
38Diego A. Mundo.
39
40
41=== License
42
43Copyright 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
44Copyright 2017 Diego A. Mundo <dieggsy@pm.me>
45
46Permission is hereby granted, free of charge, to any person obtaining a copy of
47this software and associated documentation files (the "Software"), to deal in
48the Software without restriction, including without limitation the rights to
49use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
50of the Software, and to permit persons to whom the Software is furnished to do
51so, subject to the following conditions:
52
53The above copyright notice and this permission notice shall be included in all
54copies or substantial portions of the Software.
55
56THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
57IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
58FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
59AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
60LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
61OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
62SOFTWARE.
63
64=== Version History
65
66; 0.2 : Port to CHICKEN 5
67; 0.1 : Taken from the srfi-123 core library unit and released as an egg.
Note: See TracBrowser for help on using the repository browser.