ace411/bingo-functional

getJust method in Nothing class is strange

Closed this issue ยท 3 comments

Consider the following code snippet:

public function getJust()
{
}

It looks strange because this method does nothing after using that.

I think it should return null because it's the Nothing class ๐Ÿ‘.

I concur. The fix should look something like this.

public function getJust()
{
  return $this;
}

I'll bundle this and a few other bug fixes for a minor patch release.

@ace411, thank you for your reply. I think it's the proper way to do this ๐Ÿ‘.

@peter279k I really appreciate the concern.