From 601621f7dcb17911c059d045209f3a8bcba34ced Mon Sep 17 00:00:00 2001 From: Lassi Kortela Date: Thu, 28 Mar 2019 12:37:15 +0200 Subject: [PATCH] Refactor cond to if --- tex-parser.scm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tex-parser.scm b/tex-parser.scm index 28b41b3..8188243 100644 --- a/tex-parser.scm +++ b/tex-parser.scm @@ -16,11 +16,10 @@ (define (read-tex-thing) (cond ((read-char? #\\) (let ((command (read-char* tex-command-char?))) - (cond (command - (cons (string->symbol command) - (read-tex-command-args))) - (else - (read-char* not-tex-special-char?))))) + (if command + (cons (string->symbol command) + (read-tex-command-args)) + (read-char* not-tex-special-char?)))) ((read-char? #\{) (cons 'math (read-tex-until #\}))) (else (read-char* not-tex-special-char?))))