roman

Types

pub type Numeral {
  I
  V
  X
  L
  C
  D
  M
}

Constructors

  • I
  • V
  • X
  • L
  • C
  • D
  • M
pub type Roman =
  List(Numeral)
pub type RomanError {
  InvalidNumeralCharInput
  ZeroOrNegativeIntegerInput
}

Constructors

  • InvalidNumeralCharInput
  • ZeroOrNegativeIntegerInput

Values

pub fn int_to_roman(
  val: Int,
) -> Result(List(Numeral), RomanError)
pub fn roman_to_int(roman: List(Numeral)) -> Int
pub fn roman_to_string(numerals: List(Numeral)) -> String
pub fn string_to_roman(
  input: String,
) -> Result(List(Numeral), RomanError)
Search Document