-
-
Save jazzdan/b8d10c87570b92b83890 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?hh | |
class Wrapper<Tval as num> { | |
private Tval $value; | |
public function __construct(Tval $value) { | |
$this->value = $value; | |
} | |
public function setValue(Tval $value): void { | |
$this->value = $value; | |
} | |
public function getValue(): Tval { | |
return $this->value; | |
} | |
public function add(num $addend): void { | |
$this->value += $addend; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment