Example #1
0
            public static HassiumObject iter(VirtualMachine vm, HassiumObject self, SourceLocation location, params HassiumObject[] args)
            {
                var         String = (self as HassiumString).String;
                HassiumList list   = new HassiumList(new HassiumObject[0]);

                foreach (var c in String)
                {
                    HassiumList.add(vm, list, location, new HassiumChar(c));
                }
                return(list);
            }
Example #2
0
            public static HassiumObject iter(VirtualMachine vm, HassiumObject self, SourceLocation location, params HassiumObject[] args)
            {
                var         Dictionary = (self as HassiumDictionary).Dictionary;
                HassiumList list       = new HassiumList(new HassiumObject[0]);

                foreach (var pair in Dictionary)
                {
                    HassiumList.add(vm, list, location, new HassiumTuple(pair.Key, pair.Value));
                }
                return(list);
            }