string_format

Package Version Hex Docs

gleam add string_format
import gleam/io
import string_format.{end, f, format}

pub fn main() {
  let fibo_list = [1, 1, 2, 3, 5, 8]

  let mystr =
    format("PI is {} and the First fibonacci numbers are: {}")
    |> f(3.14)
    |> f(fibo_list)
    |> end()

  io.println(mystr)
}

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

Development

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