These are chat archives for evhub/coconut
@evhub I'm running into an odd (to me, at least) behavior with combining
data types, their methods and outside functions:
>>] coconut Coconut Interpreter: (type 'exit()' or press Ctrl-D to end) >>> data X: def function(self, arg): return function(self, arg) >>> def function(x is X, arg): return arg >>> X().function(1) Traceback (most recent call last): File "<string>", line 1, in <module> File "<string>", line 33, in tail_call_optimized_func File "<string>", line 7, in function NameError: name '_coconut_recursive_func_0' is not defined >>>
It's confusing to me because within the context of an instance method, you must refer to the
function is resolved outside the method context.
Am I not understanding the design of