Changeset 49
- Timestamp:
- 03/16/06 01:53:10 (3 years ago)
- Files:
-
- trunk/jsolait/lib/iter.js (modified) (1 diff)
- trunk/jsolait/lib/sets.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/jsolait/lib/iter.js
r47 r49 274 274 iterator = new mod.ObjectIterator(iterable); 275 275 }else{ 276 throw new mod.Exception("Iterable object does not provide __iter__ method or no Iterator found.") 276 throw new mod.Exception("Iterable object does not provide __iter__ method or no Iterator found."); 277 277 } 278 278 if(arguments.length==1){ trunk/jsolait/lib/sets.js
r47 r49 52 52 /** 53 53 Initializes a Set instance. 54 @param elem* An element which is added to the set or an iterableobject of which the elements are added to the set.54 @param elem* An element which is added to the set or an Array object of which the elements are added to the set. 55 55 **/ 56 56 publ.__init__=function(elem){ … … 67 67 this.add(elems[i]); 68 68 } 69 }else{//todo needs optimization! 70 imprt('iter').iter(elems,this, function(item){ 71 this.add(item); 72 }); 69 }else{ 70 throw new mod.Exception("expecting an Array object or Set"); 73 71 } 74 72 }
