Files
WoofWare.PawPrint/WoofWare.PawPrint/ImmutableArray.fs
2025-08-23 15:18:05 +01:00

15 lines
325 B
Forth

namespace WoofWare.PawPrint
open System.Collections.Immutable
[<RequireQualifiedAccess>]
module internal ImmutableArray =
let map (f : 'a -> 'b) (arr : ImmutableArray<'a>) : ImmutableArray<'b> =
let b = ImmutableArray.CreateBuilder ()
for i in arr do
b.Add (f i)
b.ToImmutable ()