Zooper.Fox 1.1.1

dotnet add package Zooper.Fox --version 1.1.1
                    
NuGet\Install-Package Zooper.Fox -Version 1.1.1
                    
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="Zooper.Fox" Version="1.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Zooper.Fox" Version="1.1.1" />
                    
Directory.Packages.props
<PackageReference Include="Zooper.Fox" />
                    
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 Zooper.Fox --version 1.1.1
                    
#r "nuget: Zooper.Fox, 1.1.1"
                    
#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.
#addin nuget:?package=Zooper.Fox&version=1.1.1
                    
Install Zooper.Fox as a Cake Addin
#tool nuget:?package=Zooper.Fox&version=1.1.1
                    
Install Zooper.Fox as a Cake Tool

Fox

<img src="icon.png" alt="drawing" width="256"/>

A lightweight functional programming library for C# that provides monadic types like Either, Option, and Unit.

🚀 Overview

Fox brings functional programming patterns to C# with a simple, intuitive API. The library focuses on providing algebraic data types that help with error handling, optional values, and composable operations.

📦 Installation

dotnet add package Zooper.Fox

🔧 Usage

Either Type

Either is a disjoint union of two types, useful for representing values that can be one of two possible types.

using Zooper.Fox;

// Create Either instances
var success = Either<string, int>.FromRight(42);
var error = Either<string, int>.FromLeft("Something went wrong");

// Pattern matching
var result = success.Match(
    left => $"Error: {left}",
    right => $"Success: {right}"
);

// Implicit conversion
Either<string, int> implicitSuccess = 42;
Either<string, int> implicitError = "Error occurred";

Option Type

Option represents a value that may or may not exist.

using Zooper.Fox;

// Create Option instances
var some = Option<int>.Some(42);
var none = Option<int>.None();

// Check if value exists
if (some.IsSome)
{
    Console.WriteLine(some.Value);
}

// Pattern matching with Option
var message = some.Match(
    value => $"Got value: {value}",
    () => "No value"
);

LINQ Extensions

Use familiar LINQ patterns with Either and Option types:

var result = await GetUserAsync(userId)
    .BindAsync(user => GetOrdersAsync(user.Id))
    .MapAsync(orders => orders.Count);

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

Made with ❤️ by the Zooper team

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Zooper.Fox:

Package Downloads
Zooper.Bee

A .NET library for building robust, functional workflows and processing pipelines.

Zooper.Bee.MediatR

A .NET library for building robust, functional workflows and processing pipelines.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.1 61 4/26/2025
1.1.0 68 4/26/2025
1.0.0 418 4/18/2025