rescript-core
rescript-core copied to clipboard
Array.fromOneItem
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
.