19.11.2014 Views

The Fortress Language Specification - CiteSeerX

The Fortress Language Specification - CiteSeerX

The Fortress Language Specification - CiteSeerX

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

40.4 Constructing Heap Sequences<br />

40.4.1 makeHeapSequenceT extends Object(n:IndexInt,item: T):HeapSequenceT<br />

throws { NegativeLengthException }<br />

A new heap sequence of length n is allocated and returned. A NegativeLengthException is thrown if n < 0 . Every<br />

element of the heap sequence is initialized to be the same as the given item .<br />

40.4.2 computeHeapSequenceT extends Object(n:IndexInt, f: IndexInt → T): HeapSequenceT<br />

throws { NegativeLengthException }<br />

A new heap sequence of length n is allocated and returned. A NegativeLengthException is thrown if n < 0 .<br />

Element j of the new heap sequence is initialized to a value computed by calling the given function f with argument<br />

j .<br />

278

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

Saved successfully!

Ooh no, something went wrong!