Skip to content

Commit

Permalink
Add short name for builder
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamil Maqdis Anton committed Dec 17, 2020
1 parent c95f05f commit c118327
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Option.fs
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,5 @@ module OptionCE =
member _.BindReturn(option: 'a option, f: 'a -> 'b): 'b option = Option.map f option

member _.MergeSources(option1: 'a option, option2: 'b option) = Option.zip option1 option2

let option = OptionBuilder()
2 changes: 2 additions & 0 deletions src/Result.fs
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,5 @@ module ResultCE =

member _.MergeSources(result1: Result<'a, 'e>, result2: Result<'b, 'e>): Result<'a * 'b, 'e> =
Result.zip result1 result2

let result = ResultBuilder()

0 comments on commit c118327

Please sign in to comment.