Skip to content

Commit 3e8a8f8

Browse files
inoaslpil
authored andcommitted
docblock, changelog
1 parent 8e8d5ac commit 3e8a8f8

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
- `string.slice` is now tail recursive and will no longer blog the stack on
66
large inputs when running on JavaScript.
7+
- Added `int.floor_divide` to complement the truncated `int.divide`.
78

89
## v0.23.0 - 2022-09-15
910

src/gleam/int.gleam

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,8 @@ pub fn divide(a: Int, by b: Int) -> Result(Int, Nil) {
527527
/// If you want to perform truncated integer division (rounding towards zero),
528528
/// use `int.divide()` or the `/` operator instead.
529529
///
530-
/// Returns division of the inputs as a `Result`.
530+
/// Returns division of the inputs as a `Result`: If the given divisor equals
531+
/// `0`, this function returns an `Error`.
531532
///
532533
/// ## Examples
533534
///

0 commit comments

Comments
 (0)