Skip to content

Commit 429e6fc

Browse files
committed
Update docs
1 parent 9844fcc commit 429e6fc

8 files changed

+55
-52
lines changed

docsrc/content/abstraction-alternative.fsx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,16 @@ Concrete implementations
5656
From .Net/F#
5757
5858
- ``list<'T>``
59-
- ``option<'T>``
6059
- ``array<'T>``
6160
- ``seq<'T>``
61+
- ``option<'T>``
62+
- ``voption<'T>``
63+
- ``Result<'T, 'Monoid>``
64+
- ``Choice<'T, 'Monoid>``
6265
- ``'T -> 'Alternative``
63-
66+
6467
From F#+
65-
68+
6669
- [``ReaderT<'R, 'MonadPlus<'T>>``](type-readert.html)
6770
- [``WriterT<'MonadPlus<'T * 'Monoid>>``](type-writert.html)
6871
- [``StateT<'S,'MonadPlus<'T * 'S>>``](type-statet.html)
@@ -73,7 +76,12 @@ From F#+
7376
- [``Compose<'AlternativeF<'AlternativeG<'T>>>``](type-compose.html)
7477
- [``DList<'T>``](type-dlist.html)
7578
- [``ZipList<'S>``](type-ziplist.html)
76-
79+
- [``NonEmptySeq<'T>``](type-nonemptyseq.html) ``*``
80+
- [``Validation<'Error, 'T>``](type-validation.html) ``*``
81+
82+
``*`` Only ``<|>`` operation
83+
84+
7785
[Suggest another](https://github.com/fsprojects/FSharpPlus/issues/new) concrete implementation
7886
7987
Examples

docsrc/content/abstraction-bifoldable.fsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,14 @@ From .Net/F#
7979
8080
- ``'T * 'U``
8181
- ``struct ('T * 'U)``
82-
- ``Result<'T,'U>``
83-
- ``Choice<'T,'U>``
82+
- ``Result<'T, 'U>``
83+
- ``Choice<'T, 'U>``
8484
8585
8686
From F#+
8787
88-
- [``Const<'C,'T>``](type-const.html)
89-
- [``Validation<'err,'a>``](type-validation.html)
88+
- [``Const<'C, 'T>``](type-const.html)
89+
- [``Validation<'Error, 'T>``](type-validation.html)
9090
9191
[Suggest another](https://github.com/fsprojects/FSharpPlus/issues/new) concrete implementation
9292

docsrc/content/abstraction-bifunctor.fsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,15 @@ From .Net/F#
6868
6969
- ``'T1 * 'T2``
7070
- ``struct ('T1 * 'T2)``
71-
- ``Result<'T2,'T1>``
72-
- ``Choice<'T2,'T1>``
73-
- ``KeyValuePair<'T1,'T2>``
71+
- ``Result<'T2, 'T1>``
72+
- ``Choice<'T2, 'T1>``
73+
- ``KeyValuePair<'T1, 'T2>``
7474
7575
7676
From F#+
7777
78-
- [``Const<'C,'T>``](type-const.html)
79-
- [``Validation<'Error,'T>``](type-validation.html)
78+
- [``Const<'C, 'T>``](type-const.html)
79+
- [``Validation<'Error, 'T>``](type-validation.html)
8080
8181
[Suggest another](https://github.com/fsprojects/FSharpPlus/issues/new) concrete implementation
8282

docsrc/content/abstraction-bitraversable.fsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,14 @@ From .Net/F#
5454
5555
- ``'T * 'U``
5656
- ``struct ('T * 'U)``
57-
- ``Result<'T,'U>``
58-
- ``Choice<'T,'U>``
57+
- ``Result<'T, 'U>``
58+
- ``Choice<'T, 'U>``
5959
6060
6161
From F#+
6262
63-
- [``Const<'C,'T>``](type-const.html)
64-
- [``Validation<'Error,'T>``](type-validation.html)
63+
- [``Const<'C, 'T>``](type-const.html)
64+
- [``Validation<'Error, 'T>``](type-validation.html)
6565
6666
6767
[Suggest another](https://github.com/fsprojects/FSharpPlus/issues/new) concrete implementation

docsrc/content/abstraction-category.fsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ Concrete implementations
5555
5656
From .Net/F#
5757
58-
- ``'T->'U``
59-
- ``Func<'T,'U>``
58+
- ``'T -> 'U``
59+
- ``Func<'T, 'U>``
6060
6161
6262
From F#+

docsrc/content/abstraction-monad.fsx

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Minimal complete definition
1717
---------------------------
1818
1919
20-
* ``return x``/``result x``
20+
* ``return x`` &nbsp; / &nbsp; ``result x``
2121
* ``(>>=) x f``
2222
*)
2323
(**
@@ -281,14 +281,6 @@ module Suave =
281281
type WebPart<'a> = 'a -> OptionT<Async<'a option>>
282282
let inline succeed x = async.Return (Some x)
283283

284-
module WebPart =
285-
/// Comment from <a href="https://github.com/SuaveIO/suave/blob/v2.4.3/src/Suave/WebPart.fsi#L39-L42">WebPart.fsi</a>
286-
/// Entry-point for composing the applicative routes of the http application,
287-
/// by iterating the options, applying the context, arg, to the predicate
288-
/// from the list of options, until there's a match/a Some(x) which can be
289-
/// run.
290-
let choose (options: WebPart<'a> list) = fun x -> choice (List.map ((|>) x) options)
291-
292284
module Http =
293285
type HttpResponse = { status: int; content: string }
294286
type HttpRequest = { url: Uri; ``method``: string }
@@ -351,6 +343,8 @@ module Suave =
351343
| Error msg ->
352344
return! BAD_REQUEST msg ctx
353345
})
354-
WebPart.choose [ path "/" >=> (OK "/")
355-
path "/note" >=> register
356-
path "/notes" >=> overview ]
346+
choice [
347+
path "/" >=> (OK "/")
348+
path "/note" >=> register
349+
path "/notes" >=> overview
350+
]

docsrc/content/abstraction-semigroup.fsx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,25 +34,26 @@ From .Net/F#
3434
3535
- ``list<'T>``
3636
- ``option<'T>``
37+
- ``voption<'T>``
3738
- ``array<'T>``
3839
- ``string``
3940
- ``StringBuilder``
4041
- ``unit``
4142
- ``Set<'T>``
42-
- ``Map<'T,'U>``
43+
- ``Map<'T, 'U>``
4344
- ``TimeSpan``
4445
- ``Tuple<*>``
4546
- ``ValueTuple<*> ( * up to 7 elements)``
4647
- ``'T1* ... *'Tn``
4748
- ``Task<'T>``
4849
- ``ValueTask<'T>``
49-
- ``'T->'Semigroup``
50+
- ``'T -> 'Semigroup``
5051
- ``Async<'T>``
5152
- ``Expr<'T>``
5253
- ``Lazy<'T>``
53-
- ``Dictionary<'T,'U>``
54-
- ``IDictionary<'T,'U>``
55-
- ``IReadOnlyDictionary<'T,'U>``
54+
- ``Dictionary<'T, 'U>``
55+
- ``IDictionary<'T, 'U>``
56+
- ``IReadOnlyDictionary<'T, 'U>``
5657
- ``ResizeArray<'T>``
5758
- ``seq<'T>``
5859
- ``IEnumerator<'T>``
@@ -67,12 +68,12 @@ From F#+
6768
- [``Endo<'T>``](type-endo.html)
6869
- [``All``](type-all.html)
6970
- [``Any``](type-any.html)
70-
- [``Const<'C,'T>``](type-const.html)
71+
- [``Const<'C, 'T>``](type-const.html)
7172
- [``First<'T>``](type-first.html)
7273
- [``Last<'T>``](type-last.html)
7374
- [``DList<'T>``](type-dlist.html)
74-
- [``Vector<'T,'Dimension>``](type-vector.html)
75-
- [``Matrix<'T,'Rows,'Columns>``](type-matrix.html)
75+
- [``Vector<'T, 'Dimension>``](type-vector.html)
76+
- [``Matrix<'T, 'Rows, 'Columns>``](type-matrix.html)
7677
7778
[Suggest another](https://github.com/fsprojects/FSharpPlus/issues/new) concrete implementation
7879
*)

docsrc/content/abstraction-traversable.fsx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Minimal complete definition
2121
* ``traverse f x`` | ``sequence x``
2222
*)
2323
(**
24-
static member Traverse (t:'Traversable<'T>, f : 'T->'Functor<'U>) : 'Functor<'Traversable<'U>>
24+
static member Traverse (t:'Traversable<'T>, f: 'T -> 'Functor<'U>) : 'Functor<'Traversable<'U>>
2525
static member Sequence (t:'Traversable<'Functor<'T>>) : 'Functor<'Traversable<'T>>
2626
*)
2727
(**
@@ -68,7 +68,7 @@ From F#+
6868
- [``ZipList<'T>``](type-ziplist.html)
6969
- [``NonEmptyList<'T>``](type-nonempty.html)
7070
- [``NonEmptyMap<'Key, 'T>``](type-nonempty-map.html)
71-
- [``Validation<'Error,'T>``](type-validation.html)
71+
- [``Validation<'Error, 'T>``](type-validation.html)
7272
7373
7474
[Suggest another](https://github.com/fsprojects/FSharpPlus/issues/new) concrete implementation
@@ -88,26 +88,26 @@ open FSharpPlus
8888

8989

9090
// Some functions
91-
let getLine = async { return System.Console.ReadLine() }
91+
let getLine = async { return System.Console.ReadLine () }
9292
let f x = if x < 200 then [3 - x] else []
9393
let g x = if x < 200 then Some (3 - x) else None
9494

9595
// traverse
9696
let resSomeminus100 = traverse f (Some 103)
9797
let resLstOfNull = traverse f None
98-
let res210 = traverse f [1;2;3]
99-
let resSome210 = traverse g [1;2;3]
100-
let resEmptyList = traverse f [1000;2000;3000]
98+
let res210 = traverse f [1; 2; 3]
99+
let resSome210 = traverse g [1; 2; 3]
100+
let resEmptyList = traverse f [1000; 2000; 3000]
101101
let resEListOfElist = traverse f []
102102

103103
// sequence
104-
let resSome321 = sequence [Some 3;Some 2;Some 1]
105-
let resNone = sequence [Some 3;None ;Some 1]
106-
let res654 = (sequence [ (+) 3 ; (+) 2 ; (+) 1]) 3
107-
let resCombined = sequence [ [1;2;3] ; [4;5;6] ]
108-
let resLstOfArr = sequence [|[1;2;3] ; [4;5;6] |] // <- Uses the default method.
109-
let resArrOfLst = sequence [[|1;2;3|];[|4;5;6 |]]
104+
let resSome321 = sequence [Some 3; Some 2; Some 1]
105+
let resNone = sequence [Some 3; None ; Some 1]
106+
let res654 = (sequence [(+) 3; (+) 2; (+) 1]) 3
107+
let resCombined = sequence [ [1; 2; 3] ; [4; 5; 6] ]
108+
let resLstOfArr = sequence [|[1; 2; 3] ; [4; 5; 6] |] // <- Uses the default method.
109+
let resArrOfLst = sequence [[|1; 2; 3|]; [|4; 5; 6 |]]
110110

111111
// This computation will ask for three user inputs
112112
// try Async.RunSynchronously get3strings
113-
let get3strings = sequence [getLine;getLine;getLine]
113+
let get3strings = sequence [getLine; getLine; getLine]

0 commit comments

Comments
 (0)