Skip to content

rockofox/indigo

Repository files navigation

Indigo logo

Indigo

 

Indigo is an experimental programming language designed to lay focus on functional programming, clearity and convinience. Inspired by F# and Haskell, it aims to deliver satisfactory functional programming features, while exploring new concepts.

type Person = (name: String, age: Int)

let greet (p: Person): IO = println "Hello " ++ p.name
let main: IO<Unit> = do
    let person = Person { name: "Lily", age: 22 }
    greet person
end
# Hello Lily
map (`*`2), [2, 4, 6, 8]     # [4, 8, 12, 16]

Features

  • Structures
  • Traits
  • Polymorphism
  • Partial Functions
  • Lambda/Anonymous functions
  • Pattern Matching
  • Types
  • Function Composition/Pipelines
  • Imports
  • Generics
  • Refinement types (very WIP)

Resources