Permalink
Cannot retrieve contributors at this time
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
15 lines (10 sloc)
602 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. | |
namespace Microsoft.FSharp.Core | |
[<CompilationRepresentation(CompilationRepresentationFlags.ModuleSuffix)>] | |
module Result = | |
[<CompiledName("Map")>] | |
let map mapping result = match result with Error e -> Error e | Ok x -> Ok (mapping x) | |
[<CompiledName("MapError")>] | |
let mapError mapping result = match result with Error e -> Error (mapping e) | Ok x -> Ok x | |
[<CompiledName("Bind")>] | |
let bind binder result = match result with Error e -> Error e | Ok x -> binder x |