Hi, the following code listing gives me this TR error: 

; /home/winston/code/practice/snippets/tr.rkt:7:16: Type Checker: type mismatch
;   expected: Number
;   given: Any
;   in: n
; /home/winston/code/practice/snippets/tr.rkt:7:18: Type Checker: type mismatch
;   expected: Number
;   given: Any
;   in: n
; Type Checker: Summary: 2 errors encountered


How do I fix this type guard?

Here is the code listing:

#lang typed/racket

(define ls (port->list read (open-input-string "1 2 3 4")))
(unless (andmap number? ls)
  (error "ls not read correctly"))
(for ([n ls])
  (displayln (* n n)))

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to