diff --git a/src/main/kotlin/com/github/michaelbull/result/Factory.kt b/src/main/kotlin/com/github/michaelbull/result/Factory.kt index 3eeaec2..d2e0b72 100644 --- a/src/main/kotlin/com/github/michaelbull/result/Factory.kt +++ b/src/main/kotlin/com/github/michaelbull/result/Factory.kt @@ -21,7 +21,7 @@ inline fun runCatching(block: () -> V): Result { } /** - * Calls the specified function [block] with `this` value as its receiver and + * Calls the specified function [block] with [this] value as its receiver and * returns its encapsulated result if invocation was successful, catching and * encapsulating any thrown exception as a failure. */ diff --git a/src/main/kotlin/com/github/michaelbull/result/Map.kt b/src/main/kotlin/com/github/michaelbull/result/Map.kt index 75d3927..2394da1 100644 --- a/src/main/kotlin/com/github/michaelbull/result/Map.kt +++ b/src/main/kotlin/com/github/michaelbull/result/Map.kt @@ -62,7 +62,7 @@ inline fun Result.mapOr(default: U, transform: (V) -> U): U { /** * Maps this [Result][Result] to [U] by applying either the [transform] function if this * [Result] is [Ok], or the [default] function if this [Result] is an [Err]. Both of these - * functions must return the same type (`U`). + * functions must return the same type ([U]). * * - Rust: [Result.map_or_else](https://doc.rust-lang.org/std/result/enum.Result.html#method.map_or_else) */ @@ -95,9 +95,9 @@ inline infix fun Result, E>.mapAll(transform: (V) -> Resul } /** - * Maps this [Result][Result] to `U` by applying either the [success] function if this + * Maps this [Result][Result] to [U] by applying either the [success] function if this * [Result] is [Ok], or the [failure] function if this [Result] is an [Err]. Both of these - * functions must return the same type (`U`). + * functions must return the same type ([U]). * * - Elm: [Result.Extra.mapBoth](http://package.elm-lang.org/packages/elm-community/result-extra/2.2.0/Result-Extra#mapBoth) * - Haskell: [Data.Either.either](https://hackage.haskell.org/package/base-4.10.0.0/docs/Data-Either.html#v:either) @@ -115,9 +115,9 @@ inline fun Result.mapBoth(success: (V) -> U, failure: (E) -> U): } /** - * Maps this [Result][Result] to `U` by applying either the [success] function if this + * Maps this [Result][Result] to [U] by applying either the [success] function if this * [Result] is [Ok], or the [failure] function if this [Result] is an [Err]. Both of these - * functions must return the same type (`U`). + * functions must return the same type ([U]). * * This is functionally equivalent to [mapBoth]. *