Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

2015 003f MONO_VECTOR

John Reppy edited this pageSep 2, 2015 ·1 revision
signature MONO_VECTOR

We propose three new functions for theMONO_VECTOR signature to track the changesto theVector structure.

This page is part of proposal2015-003.


Synopsis

val toList  : vector -> elem listval append  : vector * elem -> vectorval prepend : elem * vector -> vector

Description

  • toList vec

returns the list of the elements of the vector `vec`.Will raise the `Size` exception if the resulting vector would exceed `maxLen` elements.
  • append (vec, x)

returns the vector formed by adding the element `x` to the end of the vector `vec`.Will raise the `Size` exception if the resulting vector would exceed `maxLen` elements.
  • prepend (x, vec)

returns the vector formed by adding the element `x` to the beginning of the vector `vec`.Will raise the `Size` exception if the resulting vector would exceed `maxLen` elements.

Rationale

These additions track the changes to theVector structure.

Creative Commons License
This document is licensed under a [Creative Commons Attribution 4.0 International License](http://creativecommons.org/licenses/by/4.0/).

Clone this wiki locally


[8]ページ先頭

©2009-2025 Movatter.jp