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 003l ArraySlice

John Reppy edited this pageJul 9, 2023 ·1 revision
structure ArraySlice : ARRAY_SLICE

We propose two new functions for theArraySlice module.

This page is part of proposal2015-003.


Synopsis

val toList     : 'a slice -> 'a listval toVector   : 'a slice -> 'a vector

Description

  • toList arr

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

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

Discussion

ThetoVector function is the same as the existingvector function, but itfollows thetoType/fromType naming convention.

Rationale

ThetoList operation complements the existingfromList and can be implemented moreefficiently than by usingList.tabulate.Adding thefromVector andtoVector functions help reduce the friction of convertingbetween different sequence types.

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