/**
* @inheritdoc
*/
- public function getEmpty()
- {
- return self::mempty();
- }
-
- /**
- * @inheritdoc
- */
public function orElse(callable $fn)
{
return $this;
/**
* @inheritdoc
*/
- public function getEmpty()
- {
- return self::mempty();
- }
-
- /**
- * @inheritdoc
- */
public function orElse(callable $fn)
{
return $fn();
* (<$>) :: Functor f => (a -> b) -> f a -> f b
* (<*>) :: f (a -> b) -> f a -> f b
*/
- public function traverse(callable $f)
+ public function traverse(callable $fn)
{
- return f\foldr(function ($x, $ys) use ($f) {
- $functor = $f($x);
+ return f\foldr(function ($x, $ys) use ($fn) {
+ $functor = $fn($x);
return $functor
->map(f\prepend)
/**
* @inheritdoc
- */
- public function getEmpty()
- {
- return self::mempty();
- }
-
- /**
- * @inheritdoc
*
* @throws TypeMismatchError
*/
* (<$>) :: Functor f => (a -> b) -> f a -> f b
* (<*>) :: f (a -> b) -> f a -> f b
*/
- public function traverse(callable $f)
+ public function traverse(callable $fn)
{
throw new EmptyListError(__FUNCTION__);
}
/**
* @inheritdoc
- */
- public function getEmpty()
- {
- return self::mempty();
- }
-
- /**
- * @inheritdoc
*
* @throws TypeMismatchError
*/
/**
* @inheritdoc
*/
- public function getEmpty()
- {
- return self::mempty();
- }
-
- /**
- * @inheritdoc
- */
public function concat(FantasyLand\Semigroup $value): FantasyLand\Semigroup
{
if ($value instanceof self) {
/**
* @inheritdoc
*/
- public function getEmpty()
- {
- return self::mempty();
- }
-
- /**
- * @inheritdoc
- */
public function concat(FantasyLand\Semigroup $value): FantasyLand\Semigroup
{
if ($value instanceof self) {
/**
* @inheritdoc
*/
- public function getEmpty()
- {
- return self::mempty();
- }
-
- /**
- * @inheritdoc
- */
public function concat(FantasyLand\Semigroup $value): FantasyLand\Semigroup
{
if ($value instanceof self) {