diff options
Diffstat (limited to 'src/algebra/data.spad.pamphlet')
-rw-r--r-- | src/algebra/data.spad.pamphlet | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/algebra/data.spad.pamphlet b/src/algebra/data.spad.pamphlet index b491d001..e290fcd6 100644 --- a/src/algebra/data.spad.pamphlet +++ b/src/algebra/data.spad.pamphlet @@ -37,14 +37,15 @@ Byte(): Public == Private where ++ bitand(x,y) returns the bitwise `and' of `x' and `y'. bitior: (%,%) -> % ++ bitor(x,y) returns the bitwise `inclusive or' of `x' and `y'. - + sample: () -> % + ++ sample() returns a sample datum of type Byte. Private == add import Character byte(x: NonNegativeInteger): % == not (x < 256$Lisp) => userError "integer value cannot be represented by a byte" x : % - + sample() = byte(0@NonNegativeInteger) hash x == SXHASH(x)$Lisp coerce(x: NonNegativeInteger): % == byte x |