aboutsummaryrefslogtreecommitdiff
path: root/src/gleam/json.gleam
diff options
context:
space:
mode:
Diffstat (limited to 'src/gleam/json.gleam')
-rw-r--r--src/gleam/json.gleam6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gleam/json.gleam b/src/gleam/json.gleam
index b509d7c..dcaf02e 100644
--- a/src/gleam/json.gleam
+++ b/src/gleam/json.gleam
@@ -47,11 +47,9 @@ pub external fn null() -> Json =
"thoas_encode" "null"
// TODO: document
-// TODO: test
-// TODO: change argument order
-pub fn nullable(input: Option(a), inner: fn(a) -> Json) -> Json {
+pub fn nullable(input: Option(a), the inner_type: fn(a) -> Json) -> Json {
case input {
- Some(value) -> inner(value)
+ Some(value) -> inner_type(value)
None -> null()
}
}