rescript-core icon indicating copy to clipboard operation
rescript-core copied to clipboard

Array.fromOneItem

Open jmagaram opened this issue 1 year ago • 7 comments

Creates an array from a single value. Includes documentation and tests. Zero cost binding to Array.of. F# has this by the name Array.singleton. Useful in pipeline mode to convert a single value into an array. Other possible names fromOne, fromOneValue, fromSingleItem, fromSingleValue, fromSingleton.

jmagaram avatar Mar 17 '23 20:03 jmagaram