Add negate (racket/function) to TR
This commit is contained in:
parent
cee2509476
commit
122aed8970
|
@ -7,4 +7,7 @@
|
||||||
|
|
||||||
((const 'foo) 1 2 3)
|
((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) '())
|
((curry (lambda (x y) (cons x y)) 5) '())
|
||||||
|
|
|
@ -1354,6 +1354,8 @@
|
||||||
;; scheme/function
|
;; scheme/function
|
||||||
[identity (-poly (a) (-> a a))]
|
[identity (-poly (a) (-> a a))]
|
||||||
[const (-poly (a) (-> a (->* '() Univ a)))]
|
[const (-poly (a) (-> a (->* '() Univ a)))]
|
||||||
|
[negate (-polydots (b) (-> ((list) [b b] . ->... . Univ)
|
||||||
|
((list) [b b] . ->... . -Boolean)))]
|
||||||
(primitive? (-> Univ B))
|
(primitive? (-> Univ B))
|
||||||
(primitive-closure? (-> Univ B))
|
(primitive-closure? (-> Univ B))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user