Thanks to visit codestin.com
Credit goes to github.com

Skip to content

A small data-structure for representing Left or Right. ↔️

License

SaphiraKai/gleither

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gleither ↔️

A small data-structure for representing an Either Monad. Written in the excellent gleam ✨ language. Supporting both Erlang & Javascript targets

test commits mit PRs Welcome

Docs: https://hexdocs.pm/gleither/

gleam add gleither
import gleither.{Left, Right, map, get}

pub fn main() {
  Right(1)
  |> map(fn(x) { x + 1 })
  |> get()
  // Some(2)
}

fn ex() {
  Left(1)
  |> map(fn(x) { x + 1 })
  |> get()
  // Some(1)
}

About

A small data-structure for representing Left or Right. ↔️

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Gleam 87.3%
  • Shell 12.7%