Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (define map/c
- (parametric->/c [A B] (-> (-> A B) (listof A) (listof B))))
- (define/contract (map f l) map/c
- (match l
- [(list) empty]
- [(list h t ...) (cons h (map f t))]))
- (map (lambda (x) 10) (list "foo" "bar"))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement