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.

Chapter 31<br />

Convenience Functions and Types<br />

31.1 Convenience Functions<br />

31.1.1 castT(x :Object) :T<br />

<strong>The</strong> function cast converts the type of its argument to a given type. If the static type of the argument is not a subtype<br />

of the given type, a CastException is thrown.<br />

31.1.2 instanceOf T(x :Object) :Boolean<br />

<strong>The</strong> function instanceOf tests whether its argument has a given type and returns a boolean value.<br />

31.1.3 ignore(x :Object) :()<br />

<strong>The</strong> function ignore discards the value of its argument and returns () .<br />

31.1.4 tuple(x :Object) :Object<br />

<strong>The</strong> function tuple returns its argument as a tuple expression.<br />

31.1.5 identity(x :Object) :Object<br />

<strong>The</strong> function identity returns its argument.<br />

212

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

Saved successfully!

Ooh no, something went wrong!