aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorJoe Corkerton <joe@jpc.dev>2021-03-12 16:40:06 +0000
committerLouis Pilfold <louis@lpil.uk>2021-03-13 16:51:11 +0100
commitdbb008d4064358f8a7d670e2819d9fc3cf023ade (patch)
treeafc06061176a693e75be0ca6ed350421afa25ba6 /README.md
parent3d4b9b6c94b5a41278c72ca0a9f4be6c96f02434 (diff)
downloadgleam_stdlib-dbb008d4064358f8a7d670e2819d9fc3cf023ade.tar.gz
gleam_stdlib-dbb008d4064358f8a7d670e2819d9fc3cf023ade.zip
Add installation instructions and usage examples to the README
Diffstat (limited to 'README.md')
-rw-r--r--README.md35
1 files changed, 35 insertions, 0 deletions
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