HEX
Server: Apache
System: Linux webd006.cluster128.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: zwafgyp (177615)
PHP: 7.4.33
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/zwafgyp/coolswim/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Math.php
<?php

namespace WPML\FP;

use WPML\Collect\Support\Traits\Macroable;

/**
 * @method static callable|mixed multiply( ...$a, ...$b ) - Curried :: Number → Number → Number
 * @method static callable|mixed divide( ...$a, ...$b ) - Curried :: Number → Number → Number
 * @method static callable|mixed add( ...$a, ...$b ) - Curried :: Number → Number → Number
 * @method static callable|mixed product( ...$array ) - Curried :: [Number] → Number
 */
class Math {

	use Macroable;

	/**
	 * @return void
	 */
	public static function init() {

		self::macro( 'multiply', curryN( 2, function ( $a, $b ) { return $a * $b; } ) );

		self::macro( 'divide', curryN( 2, function ( $a, $b ) { return $a / $b; } ) );

		self::macro( 'add', curryN( 2, function ( $a, $b ) { return $a + $b; } ) );

		self::macro( 'product', curryN(1, Fns::reduce( self::multiply(), 1 ) ) );
	}
}

Math::init();