diff --git a/readme.md b/readme.md index c40fed8..939540c 100644 --- a/readme.md +++ b/readme.md @@ -343,7 +343,7 @@ const predicate = (a) => a > 2 A contract specifies the obligations and guarantees of the behavior from a function or expression at runtime. This acts as a set of rules that are expected from the input and output of a function or expression, and errors are generally reported whenever a contract is violated. ```js -// Define our contract : int -> int +// Define our contract : int -> boolean const contract = (input) => { if (typeof input === 'number') return true throw new Error('Contract violated: expected int -> int')