contracts.coffee
contracts.coffee copied to clipboard
Add support for "not" operator
Want to write a contract like:
f :: (not Num) -> Bool
f = ...
Little tricky since "not" lexes down to "!" which we claim for escaping the contract expression.
I personally have not felt the need for this yet. white-list is a much more exact approach than black list.
Good, I haven't been needing too badly either. It's just a convenience anyway since you can always do NotNum = ?!(x) -> typeof isnt 'number'
Would still be nice to fill out at some point though.