Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (define (filter-accum p? op nv a b term next)
- (cond [(> a b) nv]
- [(p? a) (op (term a)
- (filter-accum p? op nv (next a)
- b term next))]
- [else (filter-accum p? op nv (next a)
- b term next)]))
- (define (meetTwice? f g a b)
- (if (> (filter-accum (lambda (x) (= (f x) (g x)))
- + 0
- a b
- (lambda (x) 1)
- (lambda (x) (+ 1 x))) 1) #t #f))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement