From 894f79581f1717cb1edbef481ba17319f76dee51 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Sun, 23 Jun 2024 21:23:01 +0100 Subject: New file for quicksort algorithm --- impls/powerset.rkt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'impls') diff --git a/impls/powerset.rkt b/impls/powerset.rkt index bbece52..5578312 100644 --- a/impls/powerset.rkt +++ b/impls/powerset.rkt @@ -27,13 +27,13 @@ ;; Print success of test (i.e. (equality expected got)) and return a ;; boolean representing if it worked. (printf "[TEST ~a]: " name) - (if (equality expected got) - (begin - (displayln "Success") - #t) - (begin - (printf "Failure (expected=~a, got=~a)~n" expected got) - #f))) + (cond + [(equality expected got) + (displayln "Success") + #t] + [else + (printf "Failure (expected=~a, got=~a)~n" expected got) + #f])) (define-syntax (perform-tests stx) (with-syntax -- cgit v1.2.3-13-gbd6f