@@ -276,7 +276,7 @@ function _iteratorFn(iterable) {
276
276
}
277
277
}
278
278
var Iterable = function Iterable ( value ) {
279
- return isIterable ( value ) ? value : Seq . apply ( undefined , arguments ) ;
279
+ return isIterable ( value ) ? value : Seq ( value ) ;
280
280
} ;
281
281
var $Iterable = Iterable ;
282
282
( $traceurRuntime . createClass ) ( Iterable , {
@@ -644,7 +644,7 @@ IterablePrototype.chain = IterablePrototype.flatMap;
644
644
} catch ( e ) { }
645
645
} ) ( ) ;
646
646
var KeyedIterable = function KeyedIterable ( value ) {
647
- return isKeyed ( value ) ? value : KeyedSeq . apply ( undefined , arguments ) ;
647
+ return isKeyed ( value ) ? value : KeyedSeq ( value ) ;
648
648
} ;
649
649
( $traceurRuntime . createClass ) ( KeyedIterable , {
650
650
flip : function ( ) {
@@ -693,7 +693,7 @@ KeyedIterablePrototype.__toStringMapper = (function(v, k) {
693
693
return k + ': ' + quoteString ( v ) ;
694
694
} ) ;
695
695
var IndexedIterable = function IndexedIterable ( value ) {
696
- return isIndexed ( value ) ? value : IndexedSeq . apply ( undefined , arguments ) ;
696
+ return isIndexed ( value ) ? value : IndexedSeq ( value ) ;
697
697
} ;
698
698
( $traceurRuntime . createClass ) ( IndexedIterable , {
699
699
toKeyedSeq : function ( ) {
@@ -794,7 +794,7 @@ var IndexedIterable = function IndexedIterable(value) {
794
794
} , { } , Iterable ) ;
795
795
IndexedIterable . prototype [ IS_INDEXED_SENTINEL ] = true ;
796
796
var SetIterable = function SetIterable ( value ) {
797
- return isIterable ( value ) && ! isAssociative ( value ) ? value : SetSeq . apply ( undefined , arguments ) ;
797
+ return isIterable ( value ) && ! isAssociative ( value ) ? value : SetSeq ( value ) ;
798
798
} ;
799
799
( $traceurRuntime . createClass ) ( SetIterable , {
800
800
get : function ( value , notSetValue ) {
@@ -856,7 +856,7 @@ function mixin(ctor, methods) {
856
856
return ctor ;
857
857
}
858
858
var Seq = function Seq ( value ) {
859
- return arguments . length === 0 ? emptySequence ( ) : ( isIterable ( value ) ? value : seqFromValue ( value , false ) ) . toSeq ( ) ;
859
+ return value === null || value === undefined ? emptySequence ( ) : ( isIterable ( value ) ? value : seqFromValue ( value , false ) ) . toSeq ( ) ;
860
860
} ;
861
861
var $Seq = Seq ;
862
862
( $traceurRuntime . createClass ) ( Seq , {
@@ -883,7 +883,7 @@ var $Seq = Seq;
883
883
return $Seq ( arguments ) ;
884
884
} } , Iterable ) ;
885
885
var KeyedSeq = function KeyedSeq ( value ) {
886
- if ( arguments . length === 0 ) {
886
+ if ( value === null || value === undefined ) {
887
887
return emptySequence ( ) . toKeyedSeq ( ) ;
888
888
}
889
889
if ( ! isIterable ( value ) ) {
@@ -904,7 +904,7 @@ var $KeyedSeq = KeyedSeq;
904
904
} } , Seq ) ;
905
905
mixin ( KeyedSeq , KeyedIterable . prototype ) ;
906
906
var IndexedSeq = function IndexedSeq ( value ) {
907
- return arguments . length === 0 ? emptySequence ( ) : ( isIterable ( value ) ? value : seqFromValue ( value , false ) ) . toIndexedSeq ( ) ;
907
+ return value === null || value === undefined ? emptySequence ( ) : ( isIterable ( value ) ? value : seqFromValue ( value , false ) ) . toIndexedSeq ( ) ;
908
908
} ;
909
909
var $IndexedSeq = IndexedSeq ;
910
910
( $traceurRuntime . createClass ) ( IndexedSeq , {
@@ -925,7 +925,7 @@ var $IndexedSeq = IndexedSeq;
925
925
} } , Seq ) ;
926
926
mixin ( IndexedSeq , IndexedIterable . prototype ) ;
927
927
var SetSeq = function SetSeq ( value ) {
928
- return arguments . length === 0 ? emptySequence ( ) . toSetSeq ( ) : ( isIterable ( value ) ? value : seqFromValue ( value , false ) ) . toSetSeq ( ) ;
928
+ return value === null || value === undefined ? emptySequence ( ) . toSetSeq ( ) : ( isIterable ( value ) ? value : seqFromValue ( value , false ) ) . toSetSeq ( ) ;
929
929
} ;
930
930
var $SetSeq = SetSeq ;
931
931
( $traceurRuntime . createClass ) ( SetSeq , { toSetSeq : function ( ) {
@@ -1192,9 +1192,8 @@ Collection.Keyed = KeyedCollection;
1192
1192
Collection . Indexed = IndexedCollection ;
1193
1193
Collection . Set = SetCollection ;
1194
1194
var Map = function Map ( value ) {
1195
- return arguments . length === 0 ? emptyMap ( ) : value && value . constructor === $Map ? value : emptyMap ( ) . merge ( KeyedIterable ( value ) ) ;
1195
+ return value === null || value === undefined ? emptyMap ( ) : isMap ( value ) ? value : emptyMap ( ) . merge ( KeyedIterable ( value ) ) ;
1196
1196
} ;
1197
- var $Map = Map ;
1198
1197
( $traceurRuntime . createClass ) ( Map , {
1199
1198
toString : function ( ) {
1200
1199
return this . __toString ( 'Map {' , '}' ) ;
@@ -2362,10 +2361,10 @@ function cacheResultThrough() {
2362
2361
}
2363
2362
var List = function List ( value ) {
2364
2363
var empty = emptyList ( ) ;
2365
- if ( arguments . length === 0 ) {
2364
+ if ( value === null || value === undefined ) {
2366
2365
return empty ;
2367
2366
}
2368
- if ( value && value . constructor === $List ) {
2367
+ if ( isList ( value ) ) {
2369
2368
return value ;
2370
2369
}
2371
2370
value = Iterable ( value ) ;
@@ -2378,7 +2377,6 @@ var List = function List(value) {
2378
2377
}
2379
2378
return empty . merge ( value ) ;
2380
2379
} ;
2381
- var $List = List ;
2382
2380
( $traceurRuntime . createClass ) ( List , {
2383
2381
toString : function ( ) {
2384
2382
return this . __toString ( 'List [' , ']' ) ;
@@ -2870,7 +2868,7 @@ function getTailOffset(size) {
2870
2868
return size < SIZE ? 0 : ( ( ( size - 1 ) >>> SHIFT ) << SHIFT ) ;
2871
2869
}
2872
2870
var Stack = function Stack ( value ) {
2873
- return arguments . length === 0 ? emptyStack ( ) : value && value . constructor === $Stack ? value : emptyStack ( ) . unshiftAll ( value ) ;
2871
+ return value === null || value === undefined ? emptyStack ( ) : isStack ( value ) ? value : emptyStack ( ) . unshiftAll ( value ) ;
2874
2872
} ;
2875
2873
var $Stack = Stack ;
2876
2874
( $traceurRuntime . createClass ) ( Stack , {
@@ -3047,9 +3045,8 @@ function emptyStack() {
3047
3045
return EMPTY_STACK || ( EMPTY_STACK = makeStack ( 0 ) ) ;
3048
3046
}
3049
3047
var Set = function Set ( value ) {
3050
- return arguments . length === 0 ? emptySet ( ) : value && value . constructor === $Set ? value : emptySet ( ) . union ( value ) ;
3048
+ return value === null || value === undefined ? emptySet ( ) : isSet ( value ) ? value : emptySet ( ) . union ( value ) ;
3051
3049
} ;
3052
- var $Set = Set ;
3053
3050
( $traceurRuntime . createClass ) ( Set , {
3054
3051
toString : function ( ) {
3055
3052
return this . __toString ( 'Set {' , '}' ) ;
@@ -3209,9 +3206,8 @@ function emptySet() {
3209
3206
return EMPTY_SET || ( EMPTY_SET = makeSet ( emptyMap ( ) ) ) ;
3210
3207
}
3211
3208
var OrderedMap = function OrderedMap ( value ) {
3212
- return arguments . length === 0 ? emptyOrderedMap ( ) : value && value . constructor === $OrderedMap ? value : emptyOrderedMap ( ) . merge ( KeyedIterable ( value ) ) ;
3209
+ return value === null || value === undefined ? emptyOrderedMap ( ) : isOrderedMap ( value ) ? value : emptyOrderedMap ( ) . merge ( KeyedIterable ( value ) ) ;
3213
3210
} ;
3214
- var $OrderedMap = OrderedMap ;
3215
3211
( $traceurRuntime . createClass ) ( OrderedMap , {
3216
3212
toString : function ( ) {
3217
3213
return this . __toString ( 'OrderedMap {' , '}' ) ;
@@ -3315,7 +3311,7 @@ var Record = function Record(defaultValues, name) {
3315
3311
if ( ! ( this instanceof RecordType ) ) {
3316
3312
return new RecordType ( values ) ;
3317
3313
}
3318
- this . _map = arguments . length === 0 ? Map ( ) : Map ( values ) ;
3314
+ this . _map = Map ( values ) ;
3319
3315
} ;
3320
3316
var keys = Object . keys ( defaultValues ) ;
3321
3317
var RecordTypePrototype = RecordType . prototype = Object . create ( RecordPrototype ) ;
0 commit comments