diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2024-06-23 21:23:01 +0100 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2024-07-17 20:10:56 +0100 |
commit | 894f79581f1717cb1edbef481ba17319f76dee51 (patch) | |
tree | 7461f729c0f78305043fe2a67c838a2d92df719e /impls | |
parent | 6d21bce57be8440b56df10fe5d0ae7bd7e86037a (diff) | |
download | algorithms-894f79581f1717cb1edbef481ba17319f76dee51.tar.gz algorithms-894f79581f1717cb1edbef481ba17319f76dee51.tar.bz2 algorithms-894f79581f1717cb1edbef481ba17319f76dee51.zip |
New file for quicksort algorithm
Diffstat (limited to 'impls')
-rw-r--r-- | impls/powerset.rkt | 14 |
1 files changed, 7 insertions, 7 deletions
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 |