⚠️ result

Result & Option Types

24 functions 266 lines Type-safe

📖 Overview

Type-safe error handling with Result and Option. No null pointer exceptions.

🚀 Quick Start

import result

function divide(a: float, b: float) -> Result[float, string] do
    if b == 0.0 do
        return Error("Division by zero")
    end
    return Ok(a / b)
end

match divide(10.0, 2.0) do
    Ok(v) => println("Result: {}", v),
    Error(e) => println("Error: {}", e)
end

← All Modules | 🇹🇷 Türkçe