You could use Base.return_types, but I doubt it will be much more
efficient.  Presumably, there is no way to use a typed container?

On Thu, 2015-05-21 at 18:56, David Maxwell <[email protected]> wrote:
> Suppose I have a heterogeneous-valued dictionary *foo_cache* where the keys 
> are a tuple of types (e.g. *(S,T,R)*) and the values are the results of a 
> call to a function *foo(x,S,T,R)* where the type of object *x* is known to 
> type inference.  I would like to annotate the type of a call to 
> *foo_cache[(S,T,R)]* so that it is known to type inference as well. I.e. I 
> want to write
>
> *f = foo_cache[(S,T,R)]::F*
>
> where *F* is the return type of a call to *foo(x,S,T,R)*.  In effect, I 
> want to tell type inference that *f* has the type of whatever type 
> inference thinks a call to *foo(x,S,T,R)* would be. Is there a way to do 
> this?

Reply via email to