public static void bindIter(@NotNull State s, Node target, @NotNull Node iter, Binding.Kind kind) {
        Type iterType = Node.transformExpr(iter, s);

        if (iterType instanceof ListType) {
            bind(s, target, ((ListType) iterType).eltType, kind);
        } else if (iterType instanceof TupleType) {
            bind(s, target, ((TupleType) iterType).toListType().eltType, kind);
        } else {
            List<Binding> ents = iterType.table.lookupAttr("__iter__");
            if (ents != null) {
                for (Binding ent : ents) {
                    if (ent == null || !(ent.type instanceof FunType)) {
                        if (!iterType.isUnknownType()) {
                            Analyzer.self.putProblem(iter, "not an iterable type: " + iterType);
                        }
                        bind(s, target, Type.UNKNOWN, kind);
                    } else {
                        bind(s, target, ((FunType) ent.type).getReturnType(), kind);
                    }
                }
            } else {
                bind(s, target, Type.UNKNOWN, kind);
            }
        }
    }