Skip to content

Commit b1f7851

Browse files
author
Ryan Miville
committed
list doc
1 parent b304bac commit b1f7851

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/clad.gleam

+7
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,13 @@ pub fn bool_with_default(
347347
flag_with_default(long_name, short_name, dynamic.bool, default, next)
348348
}
349349

350+
/// A decoder that decodes List arguments.
351+
/// # Examples
352+
/// ```gleam
353+
/// // data: ["--flavor", "vanilla", "--flavor", "chocolate"]
354+
/// use flavors <- clad.list(long_name: "flavor", short_name: "f", of: dynamic.string)
355+
/// // -> ["vanilla", "chocolate"]
356+
/// ```
350357
pub fn list(
351358
long_name long_name: String,
352359
short_name short_name: String,

0 commit comments

Comments
 (0)