function memoize( fn, context = null ){
			//======================================================
			// Many thanks to @ConorO'Brien for allowing me to use.
			// The file this is used from is located here:
			// https://github.com/ConorOBrien-Foxx/ffuncs/blob/master/backend/memoize.js
			// github profile located here:
			// https://github.com/ConorOBrien-Foxx
			//======================================================
			const func = fn.bind( context );
			let mem = new Map();
			return rename( function( ...args ) {
				return (
					!mem.has( args.join( ',' ) ) && mem.set( args.join( ',' ), func( ...args ) ),
					mem.get( args.join( ',' ) )
				);
			}, fn.name );
		}
/**
		 * Caches the result. Should only be used on pure functions, which return the same result for the same input.
		 * @param {Function} fn The function to cache.
		 * @param {Object} [context=null] The context to operate in.
		 * @returns {Function} The resulting function.
		 * @memberof XtraUtils.Function.
		 */
Caches the result. Should only be used on pure functions, which return the same result for the same input.
@param {Function} fn The function to cache.
@param {Object} [context=null] The context to operate in.
@returns {Function} The resulting function.
Caches the result . Should only be used on pure functions which return the same result for the same input . @param { Function } fn The function to cache . @param { Object } [ context = null ] The context to operate in . @returns { Function } The resulting function .
function memoize( fn, context = null ){
			const func = fn.bind( context );
			let mem = new Map();
			return rename( function( ...args ) {
				return (
					!mem.has( args.join( ',' ) ) && mem.set( args.join( ',' ), func( ...args ) ),
					mem.get( args.join( ',' ) )
				);
			}, fn.name );
		}
function memoize ( fn , context = null ) { const func = fn . bind ( context ) ; let mem = new Map ( ) ; return rename ( function ( ... args ) { return ( ! mem . has ( args . join ( ',' ) ) && mem . set ( args . join ( ',' ) , func ( ... args ) ) , mem . get ( args . join ( ',' ) ) ) ; } , fn . name ) ; }
Caches the result.
Caches the result .
//====================================================== // Many thanks to @ConorO'Brien for allowing me to use. // The file this is used from is located here: // https://github.com/ConorOBrien-Foxx/ffuncs/blob/master/backend/memoize.js // github profile located here: // https://github.com/ConorOBrien-Foxx //======================================================