From dbb008d4064358f8a7d670e2819d9fc3cf023ade Mon Sep 17 00:00:00 2001 From: Joe Corkerton Date: Fri, 12 Mar 2021 16:40:06 +0000 Subject: Add installation instructions and usage examples to the README --- README.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 3514ea0..0545456 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,41 @@ Gleam's standard library! Documentation available on [HexDocs](https://hexdocs.pm/gleam_stdlib/). +## Installation + +Add `gleam_stdlib` to the deps section of your `rebar.config` or `mix.exs` + +```erlang +{deps, [ + {gleam_stdlib, "0.14.0"} +]} +``` + +```elixir +defp deps do + [ + {:gleam_stdlib, "~> 0.14.0"}, + ] +end +``` + +## Usage + +Import the modules you want to use first + +```rust +import gleam/string +import gleam/list.{contains} + +fn usage() { + string.append("str", "ing") +} + +fn more_usage() { + contains([1, 2, 3], any: 2) +} +``` + ## Quick reference ```sh -- cgit v1.2.3