pyrser/type_system/scope.py
def findTranslationTo(self, t2: str) -> (bool, Signature, Translator):
        """ Find an arrow (->)
        aka a function able to translate something to t2
        """
        if not t2.is_polymorphic:
            collect = []
            for s in self.values():
                t1 = s.tret
                if t1.is_polymorphic:
                    continue
                if (s.tret in self.mapTypeTranslate):
                    if (t2 in self.mapTypeTranslate[t1]):
                        collect.append((
                            True,
                            s,
                            self.mapTypeTranslate[t1][t2]
                        ))
            # if len > 1 too many candidates
            if len(collect) == 1:
                return collect[0]
        return (False, None, None)
def findTranslationTo(self, t2: str) -> (bool, Signature, Translator):
        """ Find an arrow (->)
        aka a function able to translate something to t2
        """
        if not t2.is_polymorphic:
            collect = []
            for s in self.values():
                t1 = s.tret
                if t1.is_polymorphic:
                    continue
                if (s.tret in self.mapTypeTranslate):
                    if (t2 in self.mapTypeTranslate[t1]):
                        collect.append((
                            True,
                            s,
                            self.mapTypeTranslate[t1][t2]
                        ))
            # if len > 1 too many candidates
            if len(collect) == 1:
                return collect[0]
        return (False, None, None)
Find an arrow (->)
        aka a function able to translate something to t2