<commit_before>'use strict';

// MODULES //

var isArray = require( '@stdlib/utils/is-array' );
var isTypedArrayLike = require( '@stdlib/utils/is-typed-array-like' );
var isInteger = require( '@stdlib/utils/is-integer' );
var popObject = require( './pop_object.js' );
var popTypedArray = require( './pop_typed_array.js' );


// MAIN //

/**
* Removes and returns the last element of a collection.
*
* @param {(Array|TypedArray|Object)} collection - collection
* @throws {TypeError} must provide either an Array, Typed Array, or an array-like Object
* @returns {Array} updated collection and the removed element
*
* @example
* var arr = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];
*
* var out = pop( arr );
* // returns [ [ 1.0, 2.0, 3.0, 4.0 ], 5.0 ]
*
* @example
* var arr = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );
* // returns <Float64Array>[ 1.0, 2.0, 3.0, 4.0, 5.0 ]
*
* var out = pop( arr )
* // returns [ <Float64Array>[ 1.0, 2.0, 3.0, 4.0 ], 5.0 ]
*/
function pop( collection ) {
	var v;
	if ( isArray( collection ) ) {
		v = collection.pop();
		return [ collection, v ];<commit_msg>Update description<commit_after>'use strict';

// MODULES //

var isArray = require( '@stdlib/utils/is-array' );
var isTypedArrayLike = require( '@stdlib/utils/is-typed-array-like' );
var isInteger = require( '@stdlib/utils/is-integer' );
var popObject = require( './pop_object.js' );
var popTypedArray = require( './pop_typed_array.js' );


// MAIN //

/**
* Removes and returns the last element of a collection.
*
* @param {(Array|TypedArray|Object)} collection - collection
* @throws {TypeError} must provide either an array, typed array, or an array-like object
* @returns {Array} updated collection and the removed element
*
* @example
* var arr = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];
*
* var out = pop( arr );
* // returns [ [ 1.0, 2.0, 3.0, 4.0 ], 5.0 ]
*
* @example
* var arr = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );
* // returns <Float64Array>[ 1.0, 2.0, 3.0, 4.0, 5.0 ]
*
* var out = pop( arr )
* // returns [ <Float64Array>[ 1.0, 2.0, 3.0, 4.0 ], 5.0 ]
*/
function pop( collection ) {
	var v;
	if ( isArray( collection ) ) {
		v = collection.pop();
		return [ collection, v ];
{'fraction_non_alphanumeric': 0.19052001840773125, 'fraction_numerical': 0.05154164749194662, 'mean_word_length': 3.24609375, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3097800', 'n_tokens_mistral': 883, 'n_tokens_neox': 816, 'n_words': 235}