Add negate (racket/function) to TR

This commit is contained in:
Asumu Takikawa 2011-06-22 14:31:31 -04:00
parent cee2509476
commit 122aed8970
2 changed files with 5 additions and 0 deletions

View File

@ -7,4 +7,7 @@
((const 'foo) 1 2 3)
(filter (negate symbol?) '(1 a 2 b 3 c))
(map (negate equal?) '(1 2 3) '(1 1 1))
((curry (lambda (x y) (cons x y)) 5) '())

View File

@ -1354,6 +1354,8 @@
;; scheme/function
[identity (-poly (a) (-> a a))]
[const (-poly (a) (-> a (->* '() Univ a)))]
[negate (-polydots (b) (-> ((list) [b b] . ->... . Univ)
((list) [b b] . ->... . -Boolean)))]
(primitive? (-> Univ B))
(primitive-closure? (-> Univ B))