Skip to content

Commit fd88ea7

Browse files
zwubslpil
authored andcommitted
Fix decode.recursive documentation
1 parent 330a3cc commit fd88ea7

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/gleam/dynamic/decode.gleam

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -995,26 +995,26 @@ pub fn new_primitive_decoder(
995995
})
996996
}
997997

998-
/// Create a decoder that can refer to itself, useful for decoding for deeply
998+
/// Create a decoder that can refer to itself, useful for decoding deeply
999999
/// nested data.
10001000
///
10011001
/// Attempting to create a recursive decoder without this function could result
1002-
/// in an infinite loop. If you are using `field` or other `use`able function
1002+
/// in an infinite loop. If you are using `field` or other `use`able functions
10031003
/// then you may not need to use this function.
10041004
///
10051005
/// ```gleam
10061006
/// import gleam/dynamic
1007-
/// import decode/zero.{type Decoder}
1007+
/// import gleam/dynamic/decode
10081008
///
10091009
/// type Nested {
10101010
/// Nested(List(Nested))
10111011
/// Value(String)
10121012
/// }
10131013
///
1014-
/// fn nested_decoder() -> Decoder(Nested) {
1015-
/// use <- zero.recursive
1016-
/// zero.one_of(zero.string |> zero.map(Value), [
1017-
/// zero.list(nested_decoder()) |> zero.map(Nested),
1014+
/// fn nested_decoder() -> decode.Decoder(Nested) {
1015+
/// use <- decode.recursive
1016+
/// decode.one_of(decode.string |> decode.map(Value), [
1017+
/// decode.list(nested_decoder()) |> decode.map(Nested),
10181018
/// ])
10191019
/// }
10201020
/// ```

0 commit comments

Comments
 (0)