diff --git a/docsrc/content/abstraction-alternative.fsx b/docsrc/content/abstraction-alternative.fsx index 45637c38c..c44440264 100644 --- a/docsrc/content/abstraction-alternative.fsx +++ b/docsrc/content/abstraction-alternative.fsx @@ -10,16 +10,16 @@ Applicative Functors which also have a monoid structure. ___ Minimal complete definition --------------------------- - * ``return x``/``result x`` + * ``return x``   /   ``result x`` * ``(<*>) f x`` * ``empty`` - * ``append x y``/``(<|>) x y`` + * ``append x y``   /   ``(<|>) x y`` *) (** - static member Return (x:'T) : 'Alternative<'T> - static member (<*>) (f:'T->'U, x:Alternative<'T>) : Alternative<'U> - static member get_Empty () :'Alternative - static member (<|>) (x:'Alternative<'T>, y:'Alternative<'T>) :'Alternative<'T> + static member Return (x: 'T) : 'Alternative<'T> + static member (<*>) (f: 'T -> 'U, x: 'Alternative<'T>) : 'Alternative<'U> + static member get_Empty () : 'Alternative + static member (<|>) (x: 'Alternative<'T>, y: 'Alternative<'T>) : 'Alternative<'T> *) (** Note: ``return`` can't be used outside computation expressions, use ``result`` instead. @@ -28,11 +28,14 @@ Other operations * ``mfilter`` *) (** - static member MFilter (x:seq<'Alternative>) :'Alternative + static member MFilter (x: seq<'Alternative>) : 'Alternative *) (** * ``choice`` *) +(** + static member inline Choice (source: 'Foldable<'Alt<'T>>) : 'Alt<'T> +*) (** Rules ----- @@ -56,13 +59,16 @@ Concrete implementations From .Net/F# - ``list<'T>`` - - ``option<'T>`` - ``array<'T>`` - ``seq<'T>`` + - ``option<'T>`` + - ``voption<'T>`` + - ``Result<'T, 'Monoid>`` + - ``Choice<'T, 'Monoid>`` - ``'T -> 'Alternative`` - + From F#+ - + - [``ReaderT<'R, 'MonadPlus<'T>>``](type-readert.html) - [``WriterT<'MonadPlus<'T * 'Monoid>>``](type-writert.html) - [``StateT<'S,'MonadPlus<'T * 'S>>``](type-statet.html) @@ -73,7 +79,12 @@ From F#+ - [``Compose<'AlternativeF<'AlternativeG<'T>>>``](type-compose.html) - [``DList<'T>``](type-dlist.html) - [``ZipList<'S>``](type-ziplist.html) - + - [``NonEmptySeq<'T>``](type-nonemptyseq.html) ``*`` + - [``Validation<'Error, 'T>``](type-validation.html) ``*`` + +``*`` Only ``<|>`` operation + + [Suggest another](https://github.com/fsprojects/FSharpPlus/issues/new) concrete implementation Examples diff --git a/docsrc/content/abstraction-applicative.fsx b/docsrc/content/abstraction-applicative.fsx index 7b776eb28..94eb91cac 100644 --- a/docsrc/content/abstraction-applicative.fsx +++ b/docsrc/content/abstraction-applicative.fsx @@ -10,12 +10,12 @@ A functor with application, providing operations to embed pure expressions (``re ___ Minimal complete definition --------------------------- - * ``return x``/``result x`` + * ``return x``   /   ``result x`` * ``(<*>) f x`` *) (** - static member Return (x:'T) : 'Applicative<'T> - static member (<*>) (f: 'Applicative<'T->'U>, x: 'Applicative<'T>) : 'Applicative<'U> + static member Return (x: 'T) : 'Applicative<'T> + static member (<*>) (f: 'Applicative<'T -> 'U>, x: 'Applicative<'T>) : 'Applicative<'U> *) (** Note: ``return`` can't be used outside computation expressions, use ``result`` instead. @@ -27,7 +27,7 @@ Other operations * ``lift2`` *) (** - static member Lift2 (f: 'T1->'T2->'T, x1: 'Applicative<'T1>, x2: 'Applicative<'T2>) : 'Applicative<'T> + static member Lift2 (f: 'T1 -> 'T2 -> 'T, x1: 'Applicative<'T1>, x2: 'Applicative<'T2>) : 'Applicative<'T> *) (** @@ -131,13 +131,13 @@ open FSharpPlus open FSharpPlus.Data // Apply +4 to a list -let lst5n6 = map ((+) 4) [ 1;2 ] +let lst5n6 = map ((+) 4) [ 1; 2 ] // Apply +4 to an array -let arr5n6 = map ((+) 4) [|1;2|] +let arr5n6 = map ((+) 4) [|1; 2|] // I could have written this -let arr5n6' = (+) [|4|] <*> [|1;2|] +let arr5n6' = (+) [|4|] <*> [|1; 2|] // Add two options let opt120 = (+) Some 20 <*> tryParse "100" @@ -198,7 +198,7 @@ open FSharpPlus.Math.Applicative let opt121' = Some 21 .+. tryParse "100" let optTrue = 30 >. tryParse "29" let optFalse = tryParse "30" .< 29 -let m1m2m3 = -.[1;2;3] +let m1m2m3 = -.[1; 2; 3] // Using applicative computation expression @@ -245,7 +245,17 @@ let person6 = applicative2 { // A Monad is automatically an Applicative type MyList<'s> = MyList of 's seq with - static member Return (x:'a) = MyList (Seq.singleton x) + static member Return (x: 'a) = MyList (Seq.singleton x) static member (>>=) (MyList x: MyList<'T>, f) = MyList (Seq.collect (f >> (fun (MyList x) -> x)) x) -let mappedMyList : MyList<_> = (MyList [(+) 1;(+) 2;(+) 3]) <*> (MyList [1;2;3]) +let mappedMyList : MyList<_> = (MyList [(+) 1; (+) 2; (+) 3]) <*> (MyList [1; 2; 3]) + + +(** +Recommended reading +------------------- + + - Highly recommended Matt Thornton's blog [Grokking Applicatives](https://dev.to/choc13/grokking-applicatives-44o1). + It contains examples using F#+ and an explanation from scratch. + +*) \ No newline at end of file diff --git a/docsrc/content/abstraction-bifoldable.fsx b/docsrc/content/abstraction-bifoldable.fsx index 01fdad8a4..3d8fb12e0 100644 --- a/docsrc/content/abstraction-bifoldable.fsx +++ b/docsrc/content/abstraction-bifoldable.fsx @@ -79,14 +79,14 @@ From .Net/F# - ``'T * 'U`` - ``struct ('T * 'U)`` - - ``Result<'T,'U>`` - - ``Choice<'T,'U>`` + - ``Result<'T, 'U>`` + - ``Choice<'T, 'U>`` From F#+ - - [``Const<'C,'T>``](type-const.html) - - [``Validation<'err,'a>``](type-validation.html) + - [``Const<'C, 'T>``](type-const.html) + - [``Validation<'Error, 'T>``](type-validation.html) [Suggest another](https://github.com/fsprojects/FSharpPlus/issues/new) concrete implementation diff --git a/docsrc/content/abstraction-bifunctor.fsx b/docsrc/content/abstraction-bifunctor.fsx index ddefd7975..7863e501e 100644 --- a/docsrc/content/abstraction-bifunctor.fsx +++ b/docsrc/content/abstraction-bifunctor.fsx @@ -68,15 +68,15 @@ From .Net/F# - ``'T1 * 'T2`` - ``struct ('T1 * 'T2)`` - - ``Result<'T2,'T1>`` - - ``Choice<'T2,'T1>`` - - ``KeyValuePair<'T1,'T2>`` + - ``Result<'T2, 'T1>`` + - ``Choice<'T2, 'T1>`` + - ``KeyValuePair<'T1, 'T2>`` From F#+ - - [``Const<'C,'T>``](type-const.html) - - [``Validation<'Error,'T>``](type-validation.html) + - [``Const<'C, 'T>``](type-const.html) + - [``Validation<'Error, 'T>``](type-validation.html) [Suggest another](https://github.com/fsprojects/FSharpPlus/issues/new) concrete implementation diff --git a/docsrc/content/abstraction-bitraversable.fsx b/docsrc/content/abstraction-bitraversable.fsx index ee0210d2f..f41a72897 100644 --- a/docsrc/content/abstraction-bitraversable.fsx +++ b/docsrc/content/abstraction-bitraversable.fsx @@ -54,14 +54,14 @@ From .Net/F# - ``'T * 'U`` - ``struct ('T * 'U)`` -- ``Result<'T,'U>`` -- ``Choice<'T,'U>`` +- ``Result<'T, 'U>`` +- ``Choice<'T, 'U>`` From F#+ - - [``Const<'C,'T>``](type-const.html) - - [``Validation<'Error,'T>``](type-validation.html) + - [``Const<'C, 'T>``](type-const.html) + - [``Validation<'Error, 'T>``](type-validation.html) [Suggest another](https://github.com/fsprojects/FSharpPlus/issues/new) concrete implementation diff --git a/docsrc/content/abstraction-category.fsx b/docsrc/content/abstraction-category.fsx index 961ab42eb..4ed323ca0 100644 --- a/docsrc/content/abstraction-category.fsx +++ b/docsrc/content/abstraction-category.fsx @@ -55,8 +55,8 @@ Concrete implementations From .Net/F# - - ``'T->'U`` - - ``Func<'T,'U>`` + - ``'T -> 'U`` + - ``Func<'T, 'U>`` From F#+ diff --git a/docsrc/content/abstraction-functor.fsx b/docsrc/content/abstraction-functor.fsx index f81445f2a..be70ca172 100644 --- a/docsrc/content/abstraction-functor.fsx +++ b/docsrc/content/abstraction-functor.fsx @@ -10,10 +10,10 @@ The Functor abstraction is used for types that can be mapped over. ___ Minimal complete definition --------------------------- - * ``map f x``/``(|>>) x f``/``(<<|) f x``/``() f x`` + * ``map f x``   /   ``(|>>) x f``   /   ``(<<|) f x``   /   ``() f x`` *) (** - static member Map (x:'Functor<'T>, f:'T->'U) :'Functor<'U> + static member Map (x: 'Functor<'T>, f: 'T -> 'U) : 'Functor<'U> *) (** Other operations @@ -21,7 +21,7 @@ Other operations * ``unzip x`` *) (** - static member Unzip (x:Functor<'T * 'U>) :'Functor<'T> * 'Functor<'U> + static member Unzip (x: 'Functor<'T * 'U>) : 'Functor<'T> * 'Functor<'U> *) (** Rules @@ -54,7 +54,7 @@ From F# - ``Async<'T>`` - ``Result<'T,'U>`` - ``Choice<'T,'U>`` - - ``KeyValuePair<'Key,'T>`` + - ``KeyValuePair<'Key, 'T>`` - ``Map<'Key,'T>`` - ``'Monoid * 'T`` - ``'struct ('Monoid * 'T)`` @@ -62,41 +62,41 @@ From F# - ``ValueTask<'T>`` - ``'R->'T`` - ``Expr<'T>`` - - ``Dictionary<'Key,'T>`` - - ``IDictionary<'Key,'T>`` - - ``IReadOnlyDictionary<'Key,'T>`` + - ``Dictionary<'Key, 'T>`` + - ``IDictionary<'Key,' T>`` + - ``IReadOnlyDictionary<'Key, 'T>`` - ``ResizeArray<'T>`` From F#+ - - [``Cont<'R,'T>``](type-cont.html) - - [``ContT<'R,'T>``](type-contt.html) - - [``Reader<'R,'T>``](type-reader.html) - - [``ReaderT<'R,'Monad<'T>>``](type-readert.html) - - [``Writer<'Monoid,'T>``](type-writer.html) + - [``Cont<'R, 'T>``](type-cont.html) + - [``ContT<'R, 'T>``](type-contt.html) + - [``Reader<'R, 'T>``](type-reader.html) + - [``ReaderT<'R, 'Monad<'T>>``](type-readert.html) + - [``Writer<'Monoid, 'T>``](type-writer.html) - [``WriterT<'Monad<'T * 'Monoid>>``](type-writert.html) - - [``State<'S,'T * 'S>``](type-state.html) - - [``StateT<'S,'Monad<'T * 'S>>``](type-statet.html) + - [``State<'S, 'T * 'S>``](type-state.html) + - [``StateT<'S, 'Monad<'T * 'S>>``](type-statet.html) - [``OptionT<'Monad>``](type-optiont.html) - [``ValueOptionT<'Monad>``](type-valueoptiont.html) - [``SeqT<'Monad>``](type-seqt.html) - [``ListT<'Monad>``](type-listt.html) - - [``ResultT<'Monad>``](type-resultt.html) - - [``ChoiceT<'Monad>``](type-choicet.html) - - [``Free<'Functor<'T>,'T>``](type-free.html) + - [``ResultT<'Monad>``](type-resultt.html) + - [``ChoiceT<'Monad>``](type-choicet.html) + - [``Free<'Functor<'T>, 'T>``](type-free.html) - [``NonEmptyList<'T>``](type-nonempty.html) - [``NonEmptySet<'T>``](type-nonempty-set.html) - [``NonEmptyMap<'Key, 'T>``](type-nonempty-map.html) - - [``Validation<'Error,'T>``](type-validation.html) + - [``Validation<'Error, 'T>``](type-validation.html) - [``ZipList<'T>``](type-ziplist.html) - [``ParallelArray<'T>``](type-parallelarray.html) - - [``Const<'C,'T>``](type-const.html) + - [``Const<'C, 'T>``](type-const.html) - [``Compose<'AlternativeF<'AlternativeG<'T>>>``](type-compose.html) - [``DList<'T>``](type-dlist.html) - [``Kleisli<'T, 'Monad<'U>>``](type-kleisli.html) - - [``Coproduct<'FunctorL<'T>,'FunctorR<'T>>``](type-coproduct.html) - - [``Vector<'T,'Dimension>``](type-vector.html) - - [``Matrix<'T,'Rows,'Columns>``](type-matrix.html) + - [``Coproduct<'FunctorL<'T>, 'FunctorR<'T>>``](type-coproduct.html) + - [``Vector<'T, 'Dimension>``](type-vector.html) + - [``Matrix<'T, 'Rows, 'Columns>``](type-matrix.html) Restricted: - ``string`` @@ -118,7 +118,7 @@ Examples open FSharpPlus open FSharpPlus.Math.Generic -let getLine = async { return System.Console.ReadLine() } +let getLine = async { return System.Console.ReadLine () } let putStrLn x = async { printfn "%s" x} let print x = async { printfn "%A" x} @@ -141,8 +141,8 @@ let noValue = map minus3 None let lstTimes2 = map times2 [1;2;3;4] let fTimes2minus3 = map minus3 times2 let res39 = fTimes2minus3 21G -let getChars = map (fun (x:string) -> x.ToCharArray() |> Seq.toList ) action -let quot7 = map ((+)2) <@ 5 @> +let getChars = map (fun (x: string) -> x.ToCharArray () |> Seq.toList) action +let quot7 = map ((+) 2) <@ 5 @> // try -> runIO getChars ;; @@ -153,11 +153,11 @@ type Tree<'a> = | Leaf of 'a static member map f (t:Tree<'a> ) = match t with - | Leaf x -> Leaf (f x) - | Tree(x,t1,t2) -> Tree(f x, Tree.map f t1, Tree.map f t2) + | Leaf x -> Leaf (f x) + | Tree (x, t1, t2) -> Tree (f x, Tree.map f t1, Tree.map f t2) // add instance for Functor class - static member Map (x:Tree<_>, f) = Tree.map f x + static member Map (x: Tree<_>, f) = Tree.map f x let myTree = Tree(6, Tree(2, Leaf 1, Leaf 3), Leaf 9) let mappedTree = map fTimes2minus3 myTree @@ -167,10 +167,10 @@ let mappedTree = map fTimes2minus3 myTree // An Applicative is automatically a Functor type ZipList<'s> = ZipList of 's seq with - static member Return (x:'a) = ZipList (Seq.initInfinite (konst x)) - static member (<*>) (ZipList (f:seq<'a->'b>), ZipList x) = ZipList (Seq.zip f x |> Seq.map (fun (f, x) -> f x)) : ZipList<'b> + static member Return (x: 'a) = ZipList (Seq.initInfinite (konst x)) + static member (<*>) (ZipList (f :seq<'a->'b>), ZipList x) = ZipList (Seq.zip f x |> Seq.map (fun (f, x) -> f x)) : ZipList<'b> -let mappedZipList = map string (ZipList [1;2;3]) +let mappedZipList = map string (ZipList [1; 2; 3]) // A Monad is automatically a Functor @@ -179,4 +179,13 @@ type MyList<'s> = MyList of 's seq with static member Return (x:'a) = MyList x static member (>>=) (MyList x: MyList<'T>, f) = MyList (Seq.collect (f >> (fun (MyList x) -> x)) x) -let mappedMyList = map string (MyList [1;2;3]) +let mappedMyList = map string (MyList [1; 2; 3]) + + +(** +Recommended reading +------------------- + + - Highly recommended Matt Thornton's blog [Grokking Functors](https://dev.to/choc13/grokking-functors-bla). + It contains examples using F#+ and an explanation from scratch. +*) \ No newline at end of file diff --git a/docsrc/content/abstraction-monad.fsx b/docsrc/content/abstraction-monad.fsx index 021589b0b..dd6fab944 100644 --- a/docsrc/content/abstraction-monad.fsx +++ b/docsrc/content/abstraction-monad.fsx @@ -17,7 +17,7 @@ Minimal complete definition --------------------------- - * ``return x``/``result x`` + * ``return x``   /   ``result x`` * ``(>>=) x f`` *) (** @@ -281,14 +281,6 @@ module Suave = type WebPart<'a> = 'a -> OptionT> let inline succeed x = async.Return (Some x) - module WebPart = - /// Comment from WebPart.fsi - /// Entry-point for composing the applicative routes of the http application, - /// by iterating the options, applying the context, arg, to the predicate - /// from the list of options, until there's a match/a Some(x) which can be - /// run. - let choose (options: WebPart<'a> list) = fun x -> choice (List.map ((|>) x) options) - module Http = type HttpResponse = { status: int; content: string } type HttpRequest = { url: Uri; ``method``: string } @@ -351,6 +343,22 @@ module Suave = | Error msg -> return! BAD_REQUEST msg ctx }) - WebPart.choose [ path "/" >=> (OK "/") - path "/note" >=> register - path "/notes" >=> overview ] \ No newline at end of file + choice [ + path "/" >=> (OK "/") + path "/note" >=> register + path "/notes" >=> overview + ] + +(** +Recommended reading +------------------- + + - Highly recommended Matt Thornton's blog: + + - [Grokking Monads](https://dev.to/choc13/grokking-monads-in-f-3j7f) + - [Grokking Monads Imperatively](https://dev.to/choc13/grokking-monads-imperatively-394a) + - [Grokking Monads Transformers](https://dev.to/choc13/grokking-monad-transformers-3l3) + + It contains examples using F#+ and an explanation from scratch. + +*) \ No newline at end of file diff --git a/docsrc/content/abstraction-semigroup.fsx b/docsrc/content/abstraction-semigroup.fsx index b248a7039..649e2c9c1 100644 --- a/docsrc/content/abstraction-semigroup.fsx +++ b/docsrc/content/abstraction-semigroup.fsx @@ -9,10 +9,10 @@ In mathematics, a semigroup is an algebraic structure consisting of a set togeth ___ Minimal complete definition --------------------------- - * ``(+)``/``(++)`` + * ``(+)``   /   ``(++)`` *) (** - static member (+) (x:'Semigroup, y:'Semigroup) :'Semigroup + static member (+) (x: 'Semigroup, y: 'Semigroup) : 'Semigroup *) (** Rules @@ -34,25 +34,26 @@ From .Net/F# - ``list<'T>`` - ``option<'T>`` + - ``voption<'T>`` - ``array<'T>`` - ``string`` - ``StringBuilder`` - ``unit`` - ``Set<'T>`` - - ``Map<'T,'U>`` + - ``Map<'T, 'U>`` - ``TimeSpan`` - ``Tuple<*>`` - ``ValueTuple<*> ( * up to 7 elements)`` - ``'T1* ... *'Tn`` - ``Task<'T>`` - ``ValueTask<'T>`` - - ``'T->'Semigroup`` + - ``'T -> 'Semigroup`` - ``Async<'T>`` - ``Expr<'T>`` - ``Lazy<'T>`` - - ``Dictionary<'T,'U>`` - - ``IDictionary<'T,'U>`` - - ``IReadOnlyDictionary<'T,'U>`` + - ``Dictionary<'T, 'U>`` + - ``IDictionary<'T, 'U>`` + - ``IReadOnlyDictionary<'T, 'U>`` - ``ResizeArray<'T>`` - ``seq<'T>`` - ``IEnumerator<'T>`` @@ -67,12 +68,12 @@ From F#+ - [``Endo<'T>``](type-endo.html) - [``All``](type-all.html) - [``Any``](type-any.html) - - [``Const<'C,'T>``](type-const.html) + - [``Const<'C, 'T>``](type-const.html) - [``First<'T>``](type-first.html) - [``Last<'T>``](type-last.html) - [``DList<'T>``](type-dlist.html) - - [``Vector<'T,'Dimension>``](type-vector.html) - - [``Matrix<'T,'Rows,'Columns>``](type-matrix.html) + - [``Vector<'T, 'Dimension>``](type-vector.html) + - [``Matrix<'T, 'Rows, 'Columns>``](type-matrix.html) [Suggest another](https://github.com/fsprojects/FSharpPlus/issues/new) concrete implementation *) diff --git a/docsrc/content/abstraction-traversable.fsx b/docsrc/content/abstraction-traversable.fsx index 06d802200..411cb8a52 100644 --- a/docsrc/content/abstraction-traversable.fsx +++ b/docsrc/content/abstraction-traversable.fsx @@ -21,7 +21,7 @@ Minimal complete definition * ``traverse f x`` | ``sequence x`` *) (** - static member Traverse (t:'Traversable<'T>, f : 'T->'Functor<'U>) : 'Functor<'Traversable<'U>> + static member Traverse (t:'Traversable<'T>, f: 'T -> 'Functor<'U>) : 'Functor<'Traversable<'U>> static member Sequence (t:'Traversable<'Functor<'T>>) : 'Functor<'Traversable<'T>> *) (** @@ -68,7 +68,7 @@ From F#+ - [``ZipList<'T>``](type-ziplist.html) - [``NonEmptyList<'T>``](type-nonempty.html) - [``NonEmptyMap<'Key, 'T>``](type-nonempty-map.html) - - [``Validation<'Error,'T>``](type-validation.html) + - [``Validation<'Error, 'T>``](type-validation.html) [Suggest another](https://github.com/fsprojects/FSharpPlus/issues/new) concrete implementation @@ -88,26 +88,36 @@ open FSharpPlus // Some functions -let getLine = async { return System.Console.ReadLine() } +let getLine = async { return System.Console.ReadLine () } let f x = if x < 200 then [3 - x] else [] let g x = if x < 200 then Some (3 - x) else None // traverse let resSomeminus100 = traverse f (Some 103) let resLstOfNull = traverse f None -let res210 = traverse f [1;2;3] -let resSome210 = traverse g [1;2;3] -let resEmptyList = traverse f [1000;2000;3000] +let res210 = traverse f [1; 2; 3] +let resSome210 = traverse g [1; 2; 3] +let resEmptyList = traverse f [1000; 2000; 3000] let resEListOfElist = traverse f [] // sequence -let resSome321 = sequence [Some 3;Some 2;Some 1] -let resNone = sequence [Some 3;None ;Some 1] -let res654 = (sequence [ (+) 3 ; (+) 2 ; (+) 1]) 3 -let resCombined = sequence [ [1;2;3] ; [4;5;6] ] -let resLstOfArr = sequence [|[1;2;3] ; [4;5;6] |] // <- Uses the default method. -let resArrOfLst = sequence [[|1;2;3|];[|4;5;6 |]] +let resSome321 = sequence [Some 3; Some 2; Some 1] +let resNone = sequence [Some 3; None ; Some 1] +let res654 = (sequence [(+) 3; (+) 2; (+) 1]) 3 +let resCombined = sequence [ [1; 2; 3] ; [4; 5; 6] ] +let resLstOfArr = sequence [|[1; 2; 3] ; [4; 5; 6] |] // <- Uses the default method. +let resArrOfLst = sequence [[|1; 2; 3|]; [|4; 5; 6 |]] // This computation will ask for three user inputs // try Async.RunSynchronously get3strings -let get3strings = sequence [getLine;getLine;getLine] +let get3strings = sequence [getLine; getLine; getLine] + + +(** +Recommended reading +------------------- + + - Highly recommended Matt Thornton's blog [Grokking Traversable](https://dev.to/choc13/grokking-traversable-bla). + It contains examples using F#+ and an explanation from scratch. + +*) \ No newline at end of file diff --git a/docsrc/content/lens.fsx b/docsrc/content/lens.fsx index 8f5cda14a..37c3815ef 100644 --- a/docsrc/content/lens.fsx +++ b/docsrc/content/lens.fsx @@ -265,3 +265,14 @@ let fv3 = maximumOf (traverse << both << _Some) [(Some 1, Some 2);(Some 3,Some 4 let fv4 = minimumOf (traverse << both << _Some) [(Some 1, Some 2);(Some 3,Some 4)] // val fv4 : int option = Some 1 + + +(** +Recommended reading +------------------- + + - Highly recommended Matt Thornton's blog [Grokking Lenses](https://dev.to/choc13/grokking-lenses-2jgp). + It contains examples using F#+ and an explanation from scratch. + + +*) \ No newline at end of file diff --git a/docsrc/content/type-free.fsx b/docsrc/content/type-free.fsx index 0cded1330..c886aff5d 100644 --- a/docsrc/content/type-free.fsx +++ b/docsrc/content/type-free.fsx @@ -108,10 +108,10 @@ let mainFunc () = (** -More reading ------------- +Recommended reading +------------------- - - Highly recommended Matt Thornton's blog [Grokking Free monads](https://dev.to/choc13/grokking-free-monads-9jd) and [Interpreting Free Monads](https://dev.to/choc13/interpreting-free-monads-3l3e). + - Highly recommended Matt Thornton's blog [Grokking Free Monads](https://dev.to/choc13/grokking-free-monads-9jd) and [Interpreting Free Monads](https://dev.to/choc13/interpreting-free-monads-3l3e). It contains examples using F#+ and an explanation from scratch. - Mark Seemann's blog has an [article series](https://blog.ploeh.dk/2017/06/27/pure-times/) which ends diff --git a/docsrc/content/type-reader.fsx b/docsrc/content/type-reader.fsx index 2da257a42..5e516eba3 100644 --- a/docsrc/content/type-reader.fsx +++ b/docsrc/content/type-reader.fsx @@ -143,3 +143,11 @@ and let! value = resolve d return (name,value) } +(** +Recommended reading +------------------- + + - Highly recommended Matt Thornton's blog [Grokking the Reader Monad](https://dev.to/choc13/grokking-the-reader-monad-4f45). + It contains examples using F#+ and an explanation from scratch. + +*) \ No newline at end of file diff --git a/docsrc/content/type-validation.fsx b/docsrc/content/type-validation.fsx index edaf4d55f..3e0738849 100644 --- a/docsrc/content/type-validation.fsx +++ b/docsrc/content/type-validation.fsx @@ -210,4 +210,14 @@ module Email = let failureAll = email "" - // Failure [MustNotBeEmpty;MustContainAt;MustContainPeriod] \ No newline at end of file + // Failure [MustNotBeEmpty;MustContainAt;MustContainPeriod] + +(** +Recommended reading +------------------- + + - Highly recommended Matt Thornton's blog [Grokking Applicative Validation](https://dev.to/choc13/grokking-applicative-validation-lh6). + It contains examples using F#+ and an explanation from scratch. + + +*) \ No newline at end of file