@@ -679,12 +679,13 @@ var $IndexedSequence = IndexedSequence;
679
679
return this . get ( this . length ? this . length - 1 : 0 ) ;
680
680
} ,
681
681
skip : function ( amount ) {
682
- var $__0 = this ;
683
- var skipSeq = skipFactory ( this , amount , false ) ;
684
- if ( skipSeq !== this ) {
685
- skipSeq . get = ( function ( index , notSetValue ) {
686
- return $__0 . get ( index + amount , notSetValue ) ;
687
- } ) ;
682
+ var seq = this ;
683
+ var skipSeq = skipFactory ( seq , amount , false ) ;
684
+ if ( skipSeq !== seq ) {
685
+ skipSeq . get = function ( index , notSetValue ) {
686
+ index = wrapIndex ( this , index ) ;
687
+ return index < 0 ? notSetValue : seq . get ( index + amount , notSetValue ) ;
688
+ } ;
688
689
}
689
690
return skipSeq ;
690
691
} ,
@@ -699,12 +700,13 @@ var $IndexedSequence = IndexedSequence;
699
700
} ) ) ) . fromEntrySeq ( ) . valueSeq ( ) ;
700
701
} ,
701
702
take : function ( amount ) {
702
- var $__0 = this ;
703
- var takeSeq = takeFactory ( this , amount ) ;
704
- if ( takeSeq !== this ) {
705
- takeSeq . get = ( function ( index , notSetValue ) {
706
- return index < amount ? $__0 . get ( index , notSetValue ) : notSetValue ;
707
- } ) ;
703
+ var seq = this ;
704
+ var takeSeq = takeFactory ( seq , amount ) ;
705
+ if ( takeSeq !== seq ) {
706
+ takeSeq . get = function ( index , notSetValue ) {
707
+ index = wrapIndex ( this , index ) ;
708
+ return index < amount ? seq . get ( index , notSetValue ) : notSetValue ;
709
+ } ;
708
710
}
709
711
return takeSeq ;
710
712
} ,
0 commit comments