File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 7878 return split [ 1 ] . peekFirst ( ) ;
7979 } ;
8080
81+ /**
82+ * Get the first element in the sequence.
83+ * @return {* }
84+ */
85+ ImmutableSequence . prototype . peekFirst = function ( ) {
86+ return this . tree_ . peekFirst ( ) ;
87+ } ;
88+
89+ /**
90+ * Get the last element in the sequence.
91+ * @return {* }
92+ */
93+ ImmutableSequence . prototype . peekLast = function ( ) {
94+ return this . tree_ . peekLast ( ) ;
95+ } ;
96+
8197 /**
8298 * Add an element to the front of the sequence.
8399 * @param {* } v
96112 return new ImmutableSequence ( this . tree_ . addLast ( v ) ) ;
97113 } ;
98114
115+ /**
116+ * Remove an element from the front of the sequence.
117+ * @return {ImmutableSequence }
118+ */
119+ ImmutableSequence . prototype . removeFirst = function ( ) {
120+ return new ImmutableSequence ( this . tree_ . removeFirst ( ) ) ;
121+ } ;
122+
123+ /**
124+ * Remove an element from the end of the sequence.
125+ * @return {ImmutableSequence }
126+ */
127+ ImmutableSequence . prototype . removeLast = function ( ) {
128+ return new ImmutableSequence ( this . tree_ . removeLast ( ) ) ;
129+ } ;
130+
99131 return ImmutableSequence ;
100132} ) ) ;
You can’t perform that action at this time.
0 commit comments