#$ Check if we are including environments when making a scheme. Asd it Asd it (I32 -> I32) class IntoAsd into-asd (self _) -> it inst IntoAsd Iter.EmptyIter into-asd (self) return self inst IntoAsd Asd into-asd (self _) -> _ # it would work if we ommited the type (_ IS explicitly specifying a type tho, so this would break) return self # the reason was, that we weren't ftv'ing the environment when making a function scheme. fn asd (iterable, fun) it = into-asd(iterable) return Asd(it, fun) one = 1 two = 2 three = 3 four = 4 fn fn1(x): one fn fn2(x): two fn fn3(x): three fn fn4(x): four nil() asd(fn1) asd(fn2) nil() asd(fn3) asd(fn4)