Explorar o código

alert user if there are no open predictions

George C. Privon %!s(int64=5) %!d(string=hai) anos
pai
achega
6ddac75a22
Modificáronse 1 ficheiros con 4 adicións e 3 borrados
  1. 4 3
      code/update_predictions.rkt

+ 4 - 3
code/update_predictions.rkt

@@ -146,10 +146,11 @@
   (define uIDs (filter-map (λ (testID)
                              (if (member testID resIDs) #f testID))
                            allIDs))
-
-  ; print a header and individual entry information
+  (cond
+    [(eq? (length uIDs) 0) (displayln "No open predictions.") ]
+    [else ; print a header and individual entry information
   (displayln "ID(DATE) PREDICTION: LATEST FORECAST")
-  (map printpred-without-score uIDs))
+  (map printpred-without-score uIDs)]))
 
 ; print resolved predictions
 (define (printres [score #f])