Skip to content

Commit

Permalink
rename some files
Browse files Browse the repository at this point in the history
  • Loading branch information
make-github-pseudonymous-again committed Sep 8, 2015
1 parent 5b0af10 commit 07f847a
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 24 deletions.
32 changes: 16 additions & 16 deletions js/dist/fingertree.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,29 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons

/* js/src/0-core */
/* js/src/0-core/concatenate */
/* js/src/0-core/concatenate/_append.js */
function _append(tree, list) {

return reduce(push, list, tree);
}

/* js/src/0-core/concatenate/_prepend.js */
function _prepend(tree, list) {

return reduce(cons, reversed(list), tree);
}

/* js/src/0-core/concatenate/app3.js */
var app3 = function app3(A, list, B) {

A = A.force();
B = B.force();

if (A instanceof Empty) return prepend(B, list);
if (B instanceof Empty) return append(A, list);
if (A instanceof Empty) return _prepend(B, list);
if (B instanceof Empty) return _append(A, list);

if (A instanceof Single) return prepend(B, list).cons(A.head());
if (B instanceof Single) return append(A, list).push(B.last());
if (A instanceof Single) return _prepend(B, list).cons(A.head());
if (B instanceof Single) return _append(A, list).push(B.last());

return new Deep(A.M, A.left, delay(function () {
return app3(A.middle, nodes(A.M, [].concat(_toConsumableArray(chain(A.right, list, B.left)))), B.middle);
Expand All @@ -56,18 +68,6 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
}
}

/* js/src/0-core/concatenate/extend.js */
function append(tree, list) {

return reduce(push, list, tree);
}

/* js/src/0-core/concatenate/extendleft.js */
function prepend(tree, list) {

return reduce(cons, reversed(list), tree);
}

/* js/src/0-core/concatenate/from_iterable.js */
function from_iterable(M, iterable) {

Expand Down
2 changes: 1 addition & 1 deletion js/dist/fingertree.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/dist/fingertree.min.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function append ( tree , list ) {
function _append ( tree , list ) {

return reduce( push , list , tree ) ;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function prepend ( tree , list ) {
function _prepend ( tree , list ) {

return reduce( cons , reversed( list ) , tree ) ;

Expand Down
8 changes: 4 additions & 4 deletions js/src/0-core/concatenate/app3.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ const app3 = function ( A , list , B ) {
A = A.force( ) ;
B = B.force( ) ;

if ( A instanceof Empty ) return prepend( B , list ) ;
if ( B instanceof Empty ) return append( A , list ) ;
if ( A instanceof Empty ) return _prepend( B , list ) ;
if ( B instanceof Empty ) return _append( A , list ) ;

if ( A instanceof Single ) return prepend( B , list ).cons( A.head( ) ) ;
if ( B instanceof Single ) return append( A , list ).push( B.last( ) ) ;
if ( A instanceof Single ) return _prepend( B , list ).cons( A.head( ) ) ;
if ( B instanceof Single ) return _append( A , list ).push( B.last( ) ) ;

return new Deep(
A.M ,
Expand Down

0 comments on commit 07f847a

Please sign in to comment.