libprebirth: Remove unused `append!'
* build-aux/bootstrap/libprebirth.js ($$append$b$): Remove function. ($$append): Fix whitespace.master
parent
53ea5c5f4d
commit
4702184c33
|
@ -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 );
|
||||
|
|
Loading…
Reference in New Issue