Skip to content

Commit

Permalink
Add support for index and slice to HeadSequence
Browse files Browse the repository at this point in the history
This was popping up as bad behavior for unbounded inputs
  • Loading branch information
pineapplemachine committed Jul 30, 2017
1 parent eaf3e79 commit 20ea11f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/functions/head.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,14 @@ export const HeadSequence = Sequence.extend({
},
back: null,
popBack: null,
index: null,
slice: null,
has: null,
get: function(i){
return this.source.get(i);
index: function(i){
return this.source.index(i);
},
slice: function(i, j){
return this.source.slice(i, j);
},
has: null,
get: null,
copy: function(){
return new HeadSequence(
this.headLength, this.source.copy(), this.frontIndex
Expand Down

0 comments on commit 20ea11f

Please sign in to comment.