Skip to content

Commit

Permalink
docs: remove inexistent named argument
Browse files Browse the repository at this point in the history
  • Loading branch information
Massolari committed Apr 5, 2024
1 parent bea87aa commit ec50c1a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/remote_data.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ pub fn map(
///
/// ## Examples
/// ```gleam
/// map_2(over: Success(1), over_2: Success(2), with: fn(a, b) { a + b })
/// map_2(over: Success(1), over2: Success(2), with: fn(a, b) { a + b })
/// // -> Success(3)
/// ```
///
/// ```gleam
/// map_2(over: Failure("error"), over_2: Success(2), with: fn(a, b) { a + b })
/// map_2(over: Failure("error"), over2: Success(2), with: fn(a, b) { a + b })
/// // -> Failure("error")
/// ```
pub fn map2(
Expand All @@ -63,8 +63,8 @@ pub fn map2(
/// Check `map2` for more details
pub fn map3(
over data1: RemoteData(a, error),
over_2 data2: RemoteData(b, error),
over_3 data3: RemoteData(c, error),
over2 data2: RemoteData(b, error),
over3 data3: RemoteData(c, error),
with mapper: fn(a, b, c) -> d,
) -> RemoteData(d, error) {
case data1, data2, data3 {
Expand Down Expand Up @@ -168,12 +168,12 @@ pub fn to_option(data: RemoteData(a, error)) -> Option(a) {
/// Convert an Option to a RemoteData
/// ## Examples
/// ```gleam
/// from_option(option: Some(1), or: "error")
/// from_option(Some(1), or: "error")
/// // -> Success(1)
/// ```
///
/// ```gleam
/// from_option(option: None, or: "error")
/// from_option(None, or: "error")
/// // -> Failure("error")
/// ```
pub fn from_option(option: Option(a), or error: error) -> RemoteData(a, error) {
Expand Down Expand Up @@ -214,12 +214,12 @@ pub fn to_result(
/// Convert a Result to a RemoteData
/// ## Examples
/// ```gleam
/// from_result(result: Ok(1))
/// from_result(Ok(1))
/// // -> Success(1)
/// ```
///
/// ```gleam
/// from_result(result: Error("error"))
/// from_result(Error("error"))
/// // -> Failure("error")
/// ```
pub fn from_result(result: Result(a, error)) -> RemoteData(a, error) {
Expand Down

0 comments on commit ec50c1a

Please sign in to comment.