Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;...
- (define (mapi f l)
- (cond [(empty? l) '()]
- [else (cons (f (first l)) (mapi f (rest l)))]))
- (define (raices L) (map sqrt L))
- ;...
- (define (pares L) (filter even? L))
- (define (shorty Str) (if (< (string-length Str) 5) #t #f))
- (define (cortas L) (filter shorty L))
- (define (positivos L) (filter positive? L))
- ;...
- (define (check1 v1 v2) (if (and v1 v2) #t #f) )
- (define (todos-verdaderos L) (foldr check1 #t L))
- (define (check2 v1 v2) (if (or v1 v2) #t #f) )
- (define (uno-verdadero L) (foldr check2 #t L))
- (define (LUL x y) (+ 1 y) )
- (define (cant-elementos L) (foldr LUL 0 L))
- ;...
- (define (prod L) (foldr * 1 L))
- (define (pegar L) (foldr string-append "" L))
- ;...
- (define (mult-pos L) (foldr * 1 (filter positive? L)))
- (define (sumAbs L) (foldr + 0 (map abs L)) )
- (define (check3 X) (if (not (negative? X)) #t #f ) )
- (define (raicess L) (map sqrt (filter check3 L)) )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement