Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gitbook/asyncResult/foldResult.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This is just a shortcut for `Async.map Result.fold`. See [Result.fold](../result

```fsharp
type HttpResponse<'a, 'b> =
| OK of 'a
| Ok of 'a
| InternalError of 'b

// CreatePostRequest -> Async<Result<PostId, exn>>
Expand Down
2 changes: 1 addition & 1 deletion gitbook/cancellableTaskResult/foldResult.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This is just a shortcut for `Task.map Result.fold`. See [Result.fold](../result/

```fsharp
type HttpResponse<'a, 'b> =
| OK of 'a
| Ok of 'a
| InternalError of 'b

// CreatePostRequest -> CancellableTask<Result<PostId, exn>>
Expand Down
2 changes: 1 addition & 1 deletion gitbook/jobResult/foldResult.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This is just a shortcut for `Job.map Result.fold`. See [Result.fold](../result/f

```fsharp
type HttpResponse<'a, 'b> =
| OK of 'a
| Ok of 'a
| InternalError of 'b

// CreatePostRequest -> Job<Result<PostId, exn>>
Expand Down
4 changes: 2 additions & 2 deletions gitbook/result/fold.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ And the following fake HTTP response type:

```fsharp
type HttpResponse<'a, 'b> =
| OK of 'a
| Ok of 'a
| BadRequest of 'b
```

Expand All @@ -53,7 +53,7 @@ Then using `Result.fold`, we can do the following
let handler httpRequest =
// reading the input from the HTTP request
let inputStr = httpRequest ...
inputStr |> tryParseInt |> Result.fold OK BadRequest
inputStr |> tryParseInt |> Result.fold Ok BadRequest
```


2 changes: 1 addition & 1 deletion gitbook/taskResult/foldResult.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This is just a shortcut for `Task.map Result.fold`. See [Result.fold](../result/

```fsharp
type HttpResponse<'a, 'b> =
| OK of 'a
| Ok of 'a
| InternalError of 'b

// CreatePostRequest -> Task<Result<PostId, exn>>
Expand Down
Loading