Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: fsprojects/FSharpPlus
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 105ed2c72b555ea46c4ee68cd295e2c5d44266c3
Choose a base ref
..
head repository: fsprojects/FSharpPlus
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: d80a4ad7deea90c20d85ad5c19a8f17b2962288b
Choose a head ref
10 changes: 10 additions & 0 deletions docsrc/content/abstraction-applicative.fsx
Original file line number Diff line number Diff line change
@@ -249,3 +249,13 @@ type MyList<'s> = MyList of 's seq with
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])


(**
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.
*)
9 changes: 9 additions & 0 deletions docsrc/content/abstraction-functor.fsx
Original file line number Diff line number Diff line change
@@ -180,3 +180,12 @@ type MyList<'s> = MyList of 's seq with
static member (>>=) (MyList x: MyList<'T>, f) = MyList (Seq.collect (f >> (fun (MyList x) -> x)) x)

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.
*)
16 changes: 15 additions & 1 deletion docsrc/content/abstraction-monad.fsx
Original file line number Diff line number Diff line change
@@ -347,4 +347,18 @@ module Suave =
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.
*)
10 changes: 10 additions & 0 deletions docsrc/content/abstraction-traversable.fsx
Original file line number Diff line number Diff line change
@@ -111,3 +111,13 @@ 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]


(**
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.
*)
11 changes: 11 additions & 0 deletions docsrc/content/lens.fsx
Original file line number Diff line number Diff line change
@@ -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.
*)
6 changes: 3 additions & 3 deletions docsrc/content/type-free.fsx
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions docsrc/content/type-reader.fsx
Original file line number Diff line number Diff line change
@@ -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.
*)
12 changes: 11 additions & 1 deletion docsrc/content/type-validation.fsx
Original file line number Diff line number Diff line change
@@ -210,4 +210,14 @@ module Email =


let failureAll = email ""
// Failure [MustNotBeEmpty;MustContainAt;MustContainPeriod]
// 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.
*)