diff options
author | Case Duckworth | 2023-03-21 09:46:43 -0500 |
---|---|---|
committer | Case Duckworth | 2023-03-21 09:46:43 -0500 |
commit | 02a0f6f767e00b420372d15a9546a46497dfe81c (patch) | |
tree | 712fd5be899a378a20c9af024457067b7c54510c | |
parent | Include a vector as an atom (diff) | |
download | fff-02a0f6f767e00b420372d15a9546a46497dfe81c.tar.gz fff-02a0f6f767e00b420372d15a9546a46497dfe81c.zip |
Add fff/dupes? parameter
-rwxr-xr-x | fff.scm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/fff.scm b/fff.scm index 2623211..e37fff6 100755 --- a/fff.scm +++ b/fff.scm | |||
@@ -141,6 +141,12 @@ FLAT FUCK FORMAT : Specification | |||
141 | (define fff/comments? | 141 | (define fff/comments? |
142 | (make-parameter #f)) | 142 | (make-parameter #f)) |
143 | 143 | ||
144 | (define fff/dupes? | ||
145 | (make-parameter #f)) | ||
146 | |||
147 | |||
148 | ;;; FFF -> Scheme structures | ||
149 | |||
144 | (define (fff? x) | 150 | (define (fff? x) |
145 | (and (pair? x) | 151 | (and (pair? x) |
146 | (eq? (car x) 'fff))) | 152 | (eq? (car x) 'fff))) |
@@ -184,7 +190,8 @@ FLAT FUCK FORMAT : Specification | |||
184 | ("false" . #f) | 190 | ("false" . #f) |
185 | ("null" . null)))) | 191 | ("null" . null)))) |
186 | (filter (lambda (x) | 192 | (filter (lambda (x) |
187 | (if keep-dupes? | 193 | (if (or keep-dupes? |
194 | (fff/dupes?)) | ||
188 | #t | 195 | #t |
189 | (not (member (or (car-safe x) x) | 196 | (not (member (or (car-safe x) x) |
190 | dupes)))) | 197 | dupes)))) |