Morsey

A package for encoding and decoding Morse code in Gleam.

Usage

import gleam/io
import morsey

let text = "Hello world!"
case morsey.encode(text) {
  Ok(symbols) ->
    io.println("The Morse code for " <> text <> " is " <> to_string(symbols))
  Error(morsey.InvalidCharacter(char)) ->
    io.println_error("Invalid character: " <> char)
}

Development

gleam run   # Run the project
gleam test  # Run the tests
Search Document