Skip to content

Commit d545f4a

Browse files
inoaslpil
authored andcommitted
format-docblocks
1 parent c45bba6 commit d545f4a

12 files changed

+97
-57
lines changed

src/gleam/bool.gleam

+2
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ pub fn exclusive_nor(a: Bool, b: Bool) -> Bool {
221221
///
222222
/// ```gleam
223223
/// import gleam/order
224+
///
224225
/// compare(True, False)
225226
/// // -> order.Gt
226227
/// ```
@@ -413,6 +414,7 @@ pub fn guard(
413414
///
414415
/// ```gleam
415416
/// import gleam/int
417+
///
416418
/// let name = ""
417419
/// let greeting = fn() { "Hello, " <> name }
418420
/// use <- lazy_guard(when: name == "", otherwise: greeting)

src/gleam/dict.gleam

+1-1
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ pub fn drop(from dict: Dict(k, v), drop disallowed_keys: List(k)) -> Dict(k, v)
432432
/// }
433433
/// }
434434
///
435-
/// update(dict, "a", increment)
435+
/// update(dict, "a", increment)
436436
/// // -> from_list([#("a", 1)])
437437
///
438438
/// update(dict, "b", increment)

src/gleam/dynamic.gleam

+7
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ pub fn dynamic(value: Dynamic) -> Result(Dynamic, List(DecodeError)) {
6767
///
6868
/// ```gleam
6969
/// import gleam/bit_array
70+
///
7071
/// bit_array(from("Hello")) == bit_array.from_string("Hello")
7172
/// // -> True
7273
/// ```
@@ -349,19 +350,25 @@ pub fn list(
349350
/// ```
350351
///
351352
/// ```gleam
353+
/// // `gleam/erlang/*` is available via the `gleam_erlang` package
352354
/// import gleam/erlang/atom
355+
///
353356
/// from(atom.from_string("null")) |> optional(string)
354357
/// // -> Ok(None)
355358
/// ```
356359
///
357360
/// ```gleam
361+
/// // `gleam/erlang/*` is available via the `gleam_erlang` package
358362
/// import gleam/erlang/atom
363+
///
359364
/// from(atom.from_string("nil")) |> optional(string)
360365
/// // -> Ok(None)
361366
/// ```
362367
///
363368
/// ```gleam
369+
/// // `gleam/erlang/*` is available via the `gleam_erlang` package
364370
/// import gleam/erlang/atom
371+
///
365372
/// from(atom.from_string("undefined")) |> optional(string)
366373
/// // -> Ok(None)
367374
/// ```

src/gleam/float.gleam

+3
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,7 @@ pub fn divide(a: Float, by b: Float) -> Result(Float, Nil) {
468468
///
469469
/// ```gleam
470470
/// import gleam/list
471+
///
471472
/// list.fold([1.0, 2.0, 3.0], 0.0, add)
472473
/// // -> 6.0
473474
/// ```
@@ -495,6 +496,7 @@ pub fn add(a: Float, b: Float) -> Float {
495496
///
496497
/// ```gleam
497498
/// import gleam/list
499+
///
498500
/// list.fold([2.0, 3.0, 4.0], 1.0, multiply)
499501
/// // -> 24.0
500502
/// ```
@@ -522,6 +524,7 @@ pub fn multiply(a: Float, b: Float) -> Float {
522524
///
523525
/// ```gleam
524526
/// import gleam/list
527+
///
525528
/// list.fold([1.0, 2.0, 3.0], 10.0, subtract)
526529
/// // -> 4.0
527530
/// ```

src/gleam/function.gleam

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ pub fn compose(fun1: fn(a) -> b, fun2: fn(b) -> c) -> fn(a) -> c {
3131
///
3232
/// ```gleam
3333
/// import gleam/list
34+
///
3435
/// let multiply = curry2(fn(x, y) { x * y })
3536
/// list.map([1, 2, 3], multiply(2))
3637
/// // -> [2, 4, 6]

0 commit comments

Comments
 (0)