Skip to content

2015 003h MONO_ARRAY

John Reppy edited this page Sep 2, 2015 · 1 revision
signature MONO_ARRAY

We propose three new functions for the MONO_ARRAY signature to track the changes made to the Array module.

This page is part of proposal 2015-003.


Synopsis

val toList     : array -> elem list
val fromVector : vector -> array
val toVector   : array -> vector

Description

  • toList arr

returns the list of the elements of the array `arr`.
  • fromVector vec

returns a new array that is initialized to the content of the vector `vec`.
  • toVector vec

returns a vector of the elements of the array `arr`.

Discussion

The toVector function is the same as the existing vector function, but it follows the toType/fromType naming convention.

Rationale

These additions track the changes to the Array structure.