libprebirth: Remove unused `append!'

* build-aux/bootstrap/libprebirth.js
  ($$append$b$): Remove function.
  ($$append): Fix whitespace.
master
Mike Gerwitz 2017-12-05 00:33:34 -05:00
parent 53ea5c5f4d
commit 4702184c33
Signed by: mikegerwitz
GPG Key ID: 8C917B7F5DC51BA2
1 changed files with 1 additions and 6 deletions

View File

@ -83,17 +83,12 @@ const $$cons = ( item, list ) => _assertList( list ) && [ item ].concat( list )
const $$car = xs => _assertPair( xs ) && xs[ 0 ];
const $$cdr = xs => _assertPair( xs ) && xs.slice( 1 );
// warning: this should technically set the cdr to the next element, and
// should accept any number of arguments, but that's not what we're doing
// here (note that an empty list is not a pair and therefore has no cdr)
const $$append$b$ = ( dest, xs ) => ( dest.length === 0 ) ? [] : dest.push( xs );
// warning: blows up if any items are non-lists, whereas the proper RnRS
// implementation will set the cdr to the final item even if it's not a pair
function $$append()
{
return argToArr( arguments )
.reduce( ( xs, x ) => xs.concat( _assertList( x) && x ) );
.reduce( ( xs, x ) => xs.concat( _assertList( x ) && x ) );
}
const $$list$7$ = xs => Array.isArray( xs );