*
* @param Semigroup $value
*
- * @return Semigroup
+ * @return self
*/
public function concat(self $value): self;
}
*
* @return bool
*/
- public function equals($other);
+ public function equals($other): bool;
}
*/
function equal(Setoid $a, Setoid $b = null)
{
- return curryN(2, function (Setoid $a, Setoid $b) {
+ return curryN(2, function (Setoid $a, Setoid $b):bool {
return $a->equals($b);
})(...func_get_args());
}
/**
* @inheritdoc
*/
- public function equals($other)
+ public function equals($other): bool
{
return $other instanceof self
? $this->extract() === $other->extract()
/**
* @inheritdoc
*/
- public function equals($other)
+ public function equals($other): bool
{
return $other instanceof self
? true
/**
* @inheritdoc
*/
- public function equals($other)
+ public function equals($other): bool
{
return $other instanceof self
? $this->extract() === $other->extract()
/**
* @inheritdoc
*/
- public function equals($other)
+ public function equals($other): bool
{
return $other instanceof self
? $this->extract() === $other->extract()