Created
March 3, 2010 02:09
-
-
Save akkartik/320227 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require (lib "mzlib/pregexp")) | |
; Repeatedly run regexp-replace over a list of words. | |
(let ((words (call-with-input-file "ztmp.words2" | |
(lambda(f) (read f))))) | |
(letrec ((fn (lambda() | |
(print "iter") (newline) | |
(map (lambda(x) (regexp-replace (pregexp "b.*") x "")) | |
; You can replace b with any letter. The input doesn't | |
; even have any b's. | |
words) | |
(fn)))) | |
(fn))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment