addOrThrow
ts
function Set.addOrThrow(target, value)Example
ts
import { Set } from "@monstermann/set";
Set.addOrThrow(Set.create([1, 2]), 3); // Set([1, 2, 3])
Set.addOrThrow(Set.create([1, 2]), 2); // throws FnErrorts
import { Set } from "@monstermann/set";
pipe(Set.create([1, 2]), Set.addOrThrow(3)); // Set([1, 2, 3])
pipe(Set.create([1, 2]), Set.addOrThrow(2)); // throws FnError