From 5c40ca627938820b062dab57541fb778bbfbedd4 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Tue, 18 Jun 2019 11:49:57 -0700 Subject: [PATCH] loop touchup --- beautiful-racket-demo/conjunction-demo/main.rkt | 11 +++++------ beautiful-racket-demo/expand-only-demo/main.rkt | 11 +++++------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/beautiful-racket-demo/conjunction-demo/main.rkt b/beautiful-racket-demo/conjunction-demo/main.rkt index ec83bf1..58149bd 100644 --- a/beautiful-racket-demo/conjunction-demo/main.rkt +++ b/beautiful-racket-demo/conjunction-demo/main.rkt @@ -14,12 +14,11 @@ EXPR ...))))) (define (convert-expr x) - (let loop ([x x]) - (cond - [(list? x) (map loop x)] - [(number? x) 42] - [(string? x) "whee"] - [else 'kaboom]))) + (cond + [(list? x) (map convert-expr x)] + [(number? x) 42] + [(string? x) "whee"] + [else 'kaboom])) (define-macro (dsl-module-begin EXPR ...) #'(#%module-begin diff --git a/beautiful-racket-demo/expand-only-demo/main.rkt b/beautiful-racket-demo/expand-only-demo/main.rkt index 91a4023..3ffd70c 100644 --- a/beautiful-racket-demo/expand-only-demo/main.rkt +++ b/beautiful-racket-demo/expand-only-demo/main.rkt @@ -1,12 +1,11 @@ #lang br (define (convert-expr x) - (let loop ([x x]) - (cond - [(list? x) (map loop x)] - [(number? x) 42] - [(string? x) "whee"] - [else 'kaboom]))) + (cond + [(list? x) (map convert-expr x)] + [(number? x) 42] + [(string? x) "whee"] + [else 'kaboom])) (define-macro (dsl-module-begin EXPR ...) #'(#%module-begin