Summatic.FSUtils 0.7.0

dotnet add package Summatic.FSUtils --version 0.7.0
                    
NuGet\Install-Package Summatic.FSUtils -Version 0.7.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Summatic.FSUtils" Version="0.7.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Summatic.FSUtils" Version="0.7.0" />
                    
Directory.Packages.props
<PackageReference Include="Summatic.FSUtils" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Summatic.FSUtils --version 0.7.0
                    
#r "nuget: Summatic.FSUtils, 0.7.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Summatic.FSUtils@0.7.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Summatic.FSUtils&version=0.7.0
                    
Install as a Cake Addin
#tool nuget:?package=Summatic.FSUtils&version=0.7.0
                    
Install as a Cake Tool

FSUtils

General-purpose F# utilities, extracted from the Summatic app. Published as Summatic.FSUtils; the namespace is FSUtils.

Everything here is allocation-conscious, trimming-friendly and AOT-friendly: no reflection, ValueOption rather than Option, ImmutableArray rather than list, and no sprintf.

Contents

Module What it gives you
ImmArray The ImmutableArray module FSharp.Core doesn't ship: 58 functions - map, chooseV, groupBy, mapFold, partition and the rest - InlineIfLambda and builder-based throughout. Lookups return voption.
ImmA2D, A2D An immutable 2D array with structural equality, backed by a row-major ImmutableArray, and 0-based Array2D replacements.
Equals, Hash, Compare Helpers for implementing IEquatable<'T> and IComparable<'T> over arrays, 2D arrays and tuples, instead of relying on F# structural equality.
Result, ValueOption, Task, Async, Tuple The missing combinators, notably Result.ofImmArrayMap and ValueOption.ofImmArrayMap, which short-circuit.
Instant A struct UTC timestamp. Non-UTC input is rejected rather than silently reinterpreted.
Parse voption-returning, invariant-culture parsers for int, float, Guid, Uri and Complex.
Dictionary, ImmutableDictionary tryFind returning voption, and addOrReplace.
Json Result-returning System.Text.Json accessors that check the value kind instead of throwing.
Numeric Clamps, a modulus never negative for a positive divisor, gcd, isPrime, exact integer roots, and toRoman/toAlphabets/ordinalStr. sum throws rather than wrapping on overflow.
Measure Conversions that keep units of measure attached, so float/float32 casts cannot silently drop them.
Seq, Array distinctPhysical (distinct by reference rather than by an overridden Equals), countWhere and maxWithSafe.
NonGenericWorkaround Type-checked Equals/CompareTo for the non-generic overrides, which F# otherwise routes through structural equality (dotnet/fsharp#9398).
SimpleLazy Lazy<'T> without the trimming warnings.
Builders vmaybe and result computation expressions.
SimpleCD, SerialDisposable, CancellationScope Composite disposables. SimpleCD releases in reverse order, reports misuse, and raises an AggregateException carrying any failures once everything is released; SerialDisposable holds one value at a time, releasing the last when it is replaced; CancellationScope cancels a CancellationToken when disposed.
ISignal, Mutable, Signal A change-notification primitive: map through map5, bind, and dispMap, which gives every value its own SimpleCD so per-value resources are released when the next arrives.
ToStr Builders for ToString overrides, so a case name and its contents render the same way everywhere.
DisposableTimer A timer behind a factory, so a caller can take DisposableTimer.Never and stay still instead of ticking.
Log, ISLogger A static logging facade over a sink the host installs with Log.Set.
withLock lock over System.Threading.Lock, engaging its fast path (dotnet/fsharp#17287).

Requirements

.NET 10. The library is built with F# nullable reference types enabled, but consumers need not enable them.

Notes

Opening FSUtils brings modules named Seq, Array, Result, ValueOption, Task and Async into scope, which augment the FSharp.Core modules of the same name. It also auto-opens extensions to Guid and ImmutableArray.

Until a host calls Log.Set, logging goes to the default sink, which writes to Debug and breaks into the debugger. That is deliberate - SimpleCD reports disposal mistakes through it - but it means a host should install its own sink early.

Tests

dotnet run --project Tests/Tests.fsproj

Licence

MIT.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Summatic.FSUtils:

Package Downloads
ModeMath

Mathematical formula display and editing for .NET, rendered with SkiaSharp. Reads and writes math-mode LaTeX, lays a formula out from the OpenType MATH table, and edits one with a cursor in it.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.7.0 7 9/12/2026
0.6.0 43 9/11/2026
0.5.0 44 9/11/2026
0.4.0 48 9/10/2026
0.3.2 91 9/7/2026
0.3.1 89 9/6/2026
0.3.0 350 8/21/2026
0.2.0 331 8/20/2026
0.1.0 101 8/20/2026