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

Last change on this file since 37307 was 37307, checked in by dieggsy, 7 months ago

Minor fix in license

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>
44
45Copyright 2017 Diego A. Mundo <dieggsy@pm.me>
46
47Permission is hereby granted, free of charge, to any person obtaining a copy of
48this software and associated documentation files (the "Software"), to deal in
49the Software without restriction, including without limitation the rights to
50use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
51of the Software, and to permit persons to whom the Software is furnished to do
52so, subject to the following conditions:
53
54The above copyright notice and this permission notice shall be included in all
55copies or substantial portions of the Software.
56
57THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
58IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
59FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
60AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
61LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
62OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
63SOFTWARE.
64
65=== Version History
66
67; 0.2 : Port to CHICKEN 5
68; 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.