aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis Pilfold <louis@lpil.uk>2022-01-01 16:30:04 +0000
committerLouis Pilfold <louis@lpil.uk>2022-01-01 16:30:04 +0000
commit4312916e37aed36b7677e4b548b994536444aa47 (patch)
treee247298d1bbd1e29e604436d281ebc181da7f431
parent09eee2ac5f14d0868233ad2251d6aedb5c187b59 (diff)
downloadgleam_json-4312916e37aed36b7677e4b548b994536444aa47.tar.gz
gleam_json-4312916e37aed36b7677e4b548b994536444aa47.zip
Correct example
-rw-r--r--README.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/README.md b/README.md
index f557e3c..2961785 100644
--- a/README.md
+++ b/README.md
@@ -34,7 +34,7 @@ import gleam/result
pub fn cat_from_json(json: String) -> Result<Cat, MyError> {
try data =
json.decode(encoded)
- |> result.put_error(InvalidJson)
+ |> result.map_error(InvalidJson)
let data = dynamic.from(data)
try cat = {