Skip to content

Commit 2e03506

Browse files
00-katlpil
authored andcommitted
Fix a few typos.
1 parent a108983 commit 2e03506

File tree

5 files changed

+11
-10
lines changed

5 files changed

+11
-10
lines changed

src/gleam/dynamic.gleam

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ pub fn list(a: List(Dynamic)) -> Dynamic
7070
/// Create a dynamic value from a list, converting it to a sequential runtime
7171
/// format rather than the regular list format.
7272
///
73-
/// On Erlang this will be a tuple, on JavaScript this wil be an array.
73+
/// On Erlang this will be a tuple, on JavaScript this will be an array.
7474
///
7575
@external(erlang, "erlang", "list_to_tuple")
7676
@external(javascript, "../gleam_stdlib.mjs", "list_to_array")
@@ -79,15 +79,16 @@ pub fn array(a: List(Dynamic)) -> Dynamic
7979
/// Create a dynamic value made an unordered series of keys and values, where
8080
/// the keys are unique.
8181
///
82-
/// On Erlang this will be a map, on JavaScript this wil be a Gleam dict object.
82+
/// On Erlang this will be a map, on JavaScript this will be a Gleam dict
83+
/// object.
8384
///
8485
pub fn properties(entries: List(#(Dynamic, Dynamic))) -> Dynamic {
8586
cast(dict.from_list(entries))
8687
}
8788

8889
/// A dynamic value representing nothing.
8990
///
90-
/// On Erlang this will be the atom `nil`, on JavaScript this wil be
91+
/// On Erlang this will be the atom `nil`, on JavaScript this will be
9192
/// `undefined`.
9293
///
9394
pub fn nil() -> Dynamic {

src/gleam/list.gleam

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ pub fn reverse(list: List(a)) -> List(a) {
133133
}
134134

135135
/// Reverses a list and prepends it to another list.
136-
/// This function runs in linear time, proportional to the lenght of the list
136+
/// This function runs in linear time, proportional to the length of the list
137137
/// to prepend.
138138
///
139139
fn reverse_and_prepend(list prefix: List(a), to suffix: List(a)) -> List(a) {
@@ -701,9 +701,9 @@ pub fn prepend(to list: List(a), this item: a) -> List(a) {
701701

702702
/// Joins a list of lists into a single list.
703703
///
704-
/// This function traverses all elements twice on the Javascript target.
704+
/// This function traverses all elements twice on the JavaScript target.
705705
/// This function traverses all elements once on the Erlang target.
706-
///
706+
///
707707
/// ## Examples
708708
///
709709
/// ```gleam

src/gleam/option.gleam

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
///
77
/// ## `Option` and `Result`
88
///
9-
/// In other languages failible functions may return either `Result` or
9+
/// In other languages fallible functions may return either `Result` or
1010
/// `Option` depending on whether there is more information to be given about the
11-
/// failure. In Gleam all failible functions return `Result`, and `Nil` is used
11+
/// failure. In Gleam all fallible functions return `Result`, and `Nil` is used
1212
/// as the error if there is no extra detail to give. This consistency removes
1313
/// the boilerplate that would otherwise be needed to convert between `Option`
1414
/// and `Result` types, and makes APIs more predictable.

src/gleam/string.gleam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ pub fn trim_end(string: String) -> String {
586586
///
587587
/// There is a notable overhead to using this function, so you may not want to
588588
/// use it in a tight loop. If you wish to efficiently parse a string you may
589-
/// want to use alternatives such as the [splitter package]( https://hex.pm/packages/splitter).
589+
/// want to use alternatives such as the [splitter package](https://hex.pm/packages/splitter).
590590
///
591591
/// ## Examples
592592
///

src/gleam_stdlib.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ export function byte_size(string) {
651651
return new TextEncoder().encode(string).length;
652652
}
653653

654-
// In Javascript bitwise operations convert numbers to a sequence of 32 bits
654+
// In JavaScript bitwise operations convert numbers to a sequence of 32 bits
655655
// while Erlang uses arbitrary precision.
656656
// To get around this problem and get consistent results use BigInt and then
657657
// downcast the value back to a Number value.

0 commit comments

Comments
 (0)