Skip to content

Commit

Permalink
use "cut" again, just to be super-terse.
Browse files Browse the repository at this point in the history
  • Loading branch information
offby1 committed Dec 12, 2008
1 parent 42a78aa commit 99a7781
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions scheme/mzscheme/dict.scm
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@ exec mzscheme --require "$0" --main -- ${1+"$@"}
dict)))]))

(define (adjoin-word dict word)
(hash-update dict (bag word)
(lambda (words)
(lset-adjoin equal? words word))
'()))
(hash-update
dict
(bag word)
(cut lset-adjoin equal? <> word)
'()))

(define word-acceptable?
(let ((has-vowel-regexp (regexp "[aeiouAEIOU]"))
Expand Down

0 comments on commit 99a7781

Please sign in to comment.