Skip to content

ZenoscriptFast functional programming for TypeScript

A modern language that brings functional programming paradigms to the TypeScript ecosystem with zero runtime overhead

Zenoscript Mascot

Quick Install

curl -fsSL https://zeno.run/install.sh | bash

Why Zenoscript?

Zenoscript bridges the gap between functional programming and the TypeScript ecosystem. Write expressive, maintainable code that compiles to clean TypeScript.

Quick Example

typescript
// Define a struct with methods
struct User {
  name: string;
  age: number;
}

// Pattern matching with atoms
let status = :loading

let message = match status {
  :loading => "Please wait..."
  :success => "Data loaded!"
  :error => "Something went wrong"
  _ => "Unknown status"
}

// Pipe operations for clean data flow
let result = users
  |> filter(user => user.age >= 18)
  |> map(user => user.name)
  |> sort

Compiles to Clean TypeScript

typescript
type User = {
  name: string;
  age: number;
};

const status = Symbol.for("loading");

const message = (() => {
  const __match_value = status;
  if (__match_value === Symbol.for("loading")) {
    return "Please wait...";
  } else if (__match_value === Symbol.for("success")) {
    return "Data loaded!";
  } else if (__match_value === Symbol.for("error")) {
    return "Something went wrong";
  } else {
    return "Unknown status";
  }
})();

const result = users
  .filter(user => user.age >= 18)
  .map(user => user.name)
  .sort();

Installation

Quick Install

curl -fsSL https://zeno.run/install.sh | bash

Get Started

bash
# Create a new project
zeno init my-project
cd my-project

# Start development
bun dev

What's Next?

Just getting started? Check out the Introduction and Quick Start Guide.

Released under the MIT License.