Commit ba725d1
OutBot CI
docs: fix README examples to match actual API
## Issues Fixed
### 1. Tuple Destructuring Syntax
**Problem**: Used deprecated syntax `proc((a, b): (int, int))`
**Fixed**: Updated to Chapel 2.6+ syntax:
```chapel
proc(args: (int, int)) {
const (a, b) = args;
return a + b == b + a;
}
```
### 2. Non-Existent Pattern Functions
**Problem**: Documented functions that don't exist:
- `commutativeProperty()` - doesn't exist
- `associativeProperty()` - doesn't exist
- `identityProperty()` - doesn't exist
- `idempotentProperty()` - doesn't exist
- `involutionProperty()` - doesn't exist
- `roundTripProperty()` - doesn't exist
**Fixed**: Replaced with correct usage of actual Patterns predicates:
- `isCommutative(a, b, op)` - predicate for testing commutativity
- `isAssociative(a, b, c, op)` - predicate for testing associativity
- `hasIdentity(a, e, op)` - predicate for testing identity
- `isIdempotent(x, f)` - predicate for testing idempotence
- `isInvolution(x, f)` - predicate for involution
- `isRoundTrip(x, encode, decode)` - predicate for round-trip
- Ready-made predicates: `intAddCommutative`, `intAddAssociative`, etc.
### 3. Module Import Clarity
**Problem**: `use quickchpl.Patterns;` syntax shown but doesn't work
**Fixed**: Documented that Patterns is re-exported by `use quickchpl;`
### 4. Implication Operator
**Problem**: Used non-existent `==>` operator
**Fixed**: Updated to use `implies(condition, conclusion)` function
## Verification
All README code examples have been compiled and tested to ensure they work correctly.
Fixes #77 documentation accuracy1 parent 89a3410 commit ba725d1
1 file changed
+66
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
29 | 32 | | |
30 | 33 | | |
31 | 34 | | |
| |||
123 | 126 | | |
124 | 127 | | |
125 | 128 | | |
| 129 | + | |
126 | 130 | | |
127 | 131 | | |
128 | 132 | | |
129 | | - | |
130 | | - | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
131 | 136 | | |
132 | 137 | | |
133 | 138 | | |
| |||
144 | 149 | | |
145 | 150 | | |
146 | 151 | | |
147 | | - | |
| 152 | + | |
| 153 | + | |
148 | 154 | | |
149 | 155 | | |
150 | 156 | | |
151 | 157 | | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
156 | 167 | | |
157 | | - | |
158 | | - | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
159 | 177 | | |
160 | | - | |
161 | | - | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
162 | 187 | | |
163 | | - | |
164 | | - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
165 | 194 | | |
166 | 195 | | |
167 | 196 | | |
168 | 197 | | |
169 | 198 | | |
170 | 199 | | |
171 | | - | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
172 | 207 | | |
173 | 208 | | |
174 | | - | |
175 | | - | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
176 | 216 | | |
177 | 217 | | |
178 | | - | |
179 | | - | |
180 | | - | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
181 | 227 | | |
182 | 228 | | |
183 | 229 | | |
| |||
0 commit comments