19.11.2014 Views

The Fortress Language Specification - CiteSeerX

The Fortress Language Specification - CiteSeerX

The Fortress Language Specification - CiteSeerX

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

31.2 Convenience Types<br />

An optional value v is either Nothing or Just(v) declared as follows:<br />

(∗ Optional Values ∗)<br />

trait MaybeT comprises { Nothing, JustT }<br />

isNothing: Boolean<br />

end<br />

object Nothing extends MaybeT excludes JustT where {T extends Object}<br />

end<br />

object JustT(just: T) extends MaybeT<br />

end<br />

213

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!