Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2018
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Racket 0.71 KB | None | 0 0
  1. (define (cleanse e)
  2.   (local [(define (cleanse-item i)
  3.             (local [(define (keep-word? w)
  4.                       (not (string=? w "@#$%")))
  5.                    
  6.                     (define (cleanse-word w curr-output)
  7.                       (cond
  8.                         [(string? w) (if (keep-word? w)
  9.                                          (cons w curr-output)
  10.                                          curr-output)]
  11.                         [(enumeration? w) (cons (cleanse w) curr-output)]))]
  12.               (foldr cleanse-word '() (item-low i))))]
  13.     (cond
  14.       [(bullets? e) (make-bullets (map cleanse-item (bullets-loi e)))]
  15.       [(points? e) (make-points (map cleanse-item (points-loi e)))])))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement