source: project/wiki/eggref/5/symbol-utils @ 37048

Last change on this file since 37048 was 37048, checked in by kon, 6 months ago

rm "qualified"

File size: 3.6 KB
Line 
1[[tags: egg]]
2
3== symbol-utils
4
5[[toc:]]
6
7
8== Documentation
9
10=== Argument Conventions
11
12{{SYM}} is a {{symbol}}
13
14{{OBJ}} is an arbitrary Scheme {{object}}
15
16A printname is the string form of a symbol.
17
18=== symbol-value-utils
19
20==== Usage
21
22<enscript language=scheme>
23(import symbol-value-utils)
24</enscript>
25
26==== unbound-value
27
28<macro>(unbound-value) -> #<unbound></macro>
29
30==== unbound-value?
31
32<macro>(unbound-value? OBJ) -> boolean</macro>
33
34==== unbound?
35
36<macro>(unbound? SYM) -> boolean</macro>
37
38==== symbol-value
39
40<macro>(symbol-value SYM [DEF]) -> *</macro>
41
42Returns {{SYM}} binding or {{DEF}} when unbound.
43
44==== unspecified-value
45
46<procedure>(unspecified-value) -> #<unspecified></procedure>
47
48==== unspecified-value?
49
50<macro>(unspecified-value? OBJ) -> boolean</macro>
51
52==== unspecified?
53
54<macro>(unspecified? OBJ) -> boolean</macro>
55
56=== symbol-name-utils
57
58==== Usage
59
60<enscript language=scheme>
61(import symbol-name-utils)
62</enscript>
63
64==== keyword->symbol
65
66<procedure>(keyword->symbol KEY) -> symbol</procedure>
67
68==== keyword->uninterned-symbol
69
70<procedure>(keyword->uninterned-symbol KEY) -> symbol</procedure>
71
72==== symbol->keyword
73
74<procedure>(symbol->keyword SYM) -> keyword</procedure>
75
76==== symbol-printname-details
77
78<procedure>(symbol-printname-details SYM) -> (string string)</procedure>
79
80Returns 2 values: the {{string}}, and any qualification prefix
81{{string}}, for {{SYM}}
82
83==== symbol-printname=?
84
85<procedure>(symbol-printname=? X Y) -> boolean</procedure>
86
87{{X}} & {{Y}} are {{symbol}}.
88
89==== symbol-printname<?
90
91<procedure>(symbol-printname<? X Y) -> boolean</procedure>
92
93{{X}} & {{Y}} are {{symbol}}.
94
95==== symbol-printname-length
96
97<procedure>(symbol-printname-length SYM) -> integer</procedure>
98
99==== max-symbol-printname-length
100
101<procedure>(max-symbol-printname-length SYMS) -> integer</procedure>
102
103{{SYMS}} is a {{list}} of {{symbol}}.
104
105=== symbol-lolevel-utils
106
107==== Usage
108
109<enscript language=scheme>
110(import symbol-lolevel-utils)
111</enscript>
112
113==== interned-symbol?
114
115<procedure>(interned-symbol? SYM) -> boolean</procedure>
116
117
118== Usage
119
120<enscript language=scheme>
121(import symbol-utils)
122</enscript>
123
124
125== Author
126
127[[/users/kon-lovett|Kon Lovett]]
128
129
130== Version history
131
132; 2.0.1 : Removed {{symbol-qualified-utils}}.
133; 2.0.0 : CHICKEN 5 release.
134; 1.2.0 : Add {{keyword->uninterned-symbol}} & {{keyword->symbol}}.
135; 1.1.0 : Add {{symbol-name-utils}},  {{symbol-value-utils}},  {{symbol-qualified-utils}},  {{symbol-lolevel-utils}} modules.
136; 1.0.3 : Add types & better type checking.
137; 1.0.2 : Fix for ticket #630.
138; 1.0.1 :
139; 1.0.0 : Hello.
140
141
142== License
143
144Copyright (C) 2010 Kon Lovett.  All rights reserved.
145
146Permission is hereby granted, free of charge, to any person obtaining a
147copy of this software and associated documentation files (the Software),
148to deal in the Software without restriction, including without limitation
149the rights to use, copy, modify, merge, publish, distribute, sublicense,
150and/or sell copies of the Software, and to permit persons to whom the
151Software is furnished to do so, subject to the following conditions:
152
153The above copyright notice and this permission notice shall be included
154in all copies or substantial portions of the Software.
155
156THE SOFTWARE IS PROVIDED ASIS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
157IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
158FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
159THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
160OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
161ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
162OTHER DEALINGS IN THE SOFTWARE.
Note: See TracBrowser for help on using the repository browser.