As Any is supertype of all values, what is the equivalent type for function types?<br><br>(Any -&gt; Any) does not work because of the contra-variant requirement of the argument.<br><br>(: f ((Any -&gt; Any) -&gt; True))<br>
(define (f g) #t)<br><br>(f (lambda (x) x) #t) ;; works<br>(f (lambda: ([x : Integer]) #f)) ;; does not work<br><br>The error is:<br><br>Type Checker: Expected (Any -&gt; Any), but got (Integer -&gt; Any) in: (lambda: ((x : Integer)) #f)<br>
<br>If I understand it correctly, the type I&#39;m looking for is (Bottom -&gt; Any), which satisfies the contra-variant and variant requirements for function subtyping. However, the Bottom type doesn&#39;t seem to exist (at least at the user-level, because I remember seeing some error messages that mentioned Top and Bottom).<br>
<br>Thanks<br><br>-- <br>Ismael<br><br>