@@ -230,14 +230,17 @@ data Bool = True | False
230
230
```
231
231
232
232
This definition is written in the simplified style , similar to `Day`. It can
233
- also be written in the verbose style ( which is more powerful ) :
233
+ also be written in the verbose style:
234
234
235
235
```idris
236
236
data Bool : Type where
237
237
True : Bool
238
238
False : Bool
239
239
```
240
240
241
+ The verbose style is more powerful because it allows us to assign precise
242
+ types to individual constructors . This will become very useful later on.
243
+
241
244
Although we are rolling our own booleans here for the sake of building up
242
245
everything from scratch, Idris does , of course , provide a default
243
246
implementation of the booleans in its standard library , together with a
@@ -279,8 +282,8 @@ truth table -- for the `orb` function:
279
282
-- TODO: Edit this
280
283
281
284
We can also introduce some familiar syntax for the boolean operations we have
282
- just defined . The `syntax` command defines a new notation for an existing
283
- definition, and `infixl` specifies left -associative fixity .
285
+ just defined . The `syntax` command defines a new symbolic notation for an
286
+ existing definition , and `infixl` specifies left -associative fixity .
284
287
\color{black}
285
288
286
289
> infixl 4 /\, \/
@@ -301,7 +304,7 @@ definition, and `infixl` specifies left-associative fixity.
301
304
Fill in the hole `?nandb_rhs` and complete the following function; then make
302
305
sure that the assertions below can each be verified by Idris. (Fill in each of
303
306
the holes , following the model of the `orb` tests above .) The function should
304
- return `True` if either or both of its inputs `False`.
307
+ return `True` if either or both of its inputs are `False`.
305
308
306
309
> nandb : (b1 : Bool) -> (b2 : Bool) -> Bool
307
310
> nandb b1 b2 = ?nandb_rhs
0 commit comments