contracts.coffee icon indicating copy to clipboard operation
contracts.coffee copied to clipboard

Add support for "not" operator

Open disnet opened this issue 14 years ago • 2 comments

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.

disnet avatar Aug 30 '11 18:08 disnet

I personally have not felt the need for this yet. white-list is a much more exact approach than black list.

gregwebs avatar Apr 24 '12 02:04 gregwebs

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.

disnet avatar Apr 24 '12 05:04 disnet