glatch

Package Version Hex Docs

logo

Gleam type check using pattern matching

gleam add glatch
import glatch.{IsString}
import gleam/string

pub fn main() {
  case glatch.get_type("Lucy") {
    IsString(_) -> "Hello, 𓇼"
    unknown -> "Who are you? " <> string.inspect(unknown)
  }
}

Further documentation can be found at https://hexdocs.pm/glatch.

Current status

Native / Stdlib

Development

gleam run   # Run the project
gleam test  # Run the tests
gleam shell # Run an Erlang shell
Search Document