From 4197555e6f7fa732bb5bf605c850972bdd84ad29 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 5 Jun 2019 14:45:27 +0200 Subject: module: Use "zero?" and "unless". * modules/language/python/module/re/compile.scm (startine, dotall, multiline, f-s, get-ch): Use "zero?" and "unless". --- modules/language/python/module/re/compile.scm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/language/python/module/re/compile.scm b/modules/language/python/module/re/compile.scm index ac2fad5..aea2c27 100644 --- a/modules/language/python/module/re/compile.scm +++ b/modules/language/python/module/re/compile.scm @@ -68,19 +68,19 @@ (define startline ( (c) - (when (= N 0) + (when (zero? N) ( c)))) (define dotall ( (c) (let ((x (fluid-ref *flags*))) - (when (not (= 0 (logand x DOTALL))) + (unless (zero? (logand x DOTALL)) ( c))))) (define multiline ( (c) (let ((x (fluid-ref *flags*))) - (when (not (= 0 (logand x MULTILINE))) + (unless (zero? (logand x MULTILINE)) ( c))))) (define (gt f) @@ -256,7 +256,7 @@ (lambda (x) (let ((fl (fluid-ref *flags*))) (and - (= (logand fl ASCII) 0) + (zero? (logand fl ASCII)) (char-whitespace? x))))) f-nl! (f-reg! "[\n\r \t\f\v]"))) @@ -348,9 +348,9 @@ (let ((chx (string-ref x 0))) (f-test! (lambda (ch) (let ((y (fluid-ref *flags*))) - (if (= 0 (logand y IGNORECASE)) + (if (zero? (logand y IGNORECASE)) (eq? ch chx) - (if (= 0 (logand y ASCII)) + (if (zero? (logand y ASCII)) (eq? (char-upcase chx) (char-upcase ch)) (if (and (< (char->integer ch) 128) (< (char->integer chx) 128)) -- cgit v1.2.3