computation-expression
how do i fix these errors generated by my computational expression that is using my custom workflow builder?
From the MSDN documentation I understand that if Run is implemented it will be called automatically at the end of the computational expression. It says that:[详细]
2023-03-05 18:19 分类:问答Retry Computation expression or other construct in F#
I want to be able to write a computation expression in F# that will be able to retry an operation if it throws an exception. Right now my code looks like:[详细]
2023-03-03 20:22 分类:问答Is there a way to make different implementation of do! and let! in a computation expression?
I need a different behavior for do! and let! in my custom computation expression. I try to achieve this in the following way:[详细]
2023-02-22 17:38 分类:问答What is the role of `while`-loops in computation expressions in F#?
If you define a While method of the builder-object, you can use while-loops in your computation expressions. The signature of the While method is:[详细]
2023-02-01 20:39 分类:问答How do I translate a `where T : U` generic type parameter constraint from C# to F#?
F# is giving me some trouble with its type inference rules. I\'m writing a simple computation builder but can\'t get my generic type variable constraints right.[详细]
2023-01-25 11:52 分类:问答Problem with computational workflow
trying to follow example in the expert f# book, and having an issue with the workflows...the code is as follows:[详细]
2023-01-25 05:11 分类:问答Recursive functions in computation expressions
Some background first. I am currently learning some stuff about monadic parser combinators. While I tried to transfer the \'chainl1\' function from this paper (p. 16-17), I came up with this solution:[详细]
2023-01-05 06:51 分类:问答LINQ query expressions that operate on types (monads?) other than IEnumerable<T> -- Possible uses?
I\'m reading the book Real-world functional programming by Tomas Petricek and Jon Skeet and I\'m having a hard time digesting the section on computation expressions1) (aka monads).[详细]
2023-01-02 11:57 分类:问答Why does this F# computation expression give a warning?
This code: type Result = Success of string type Tracer() = member x.Bind(p: Result, rest: (string -> Result)) =[详细]
2022-12-12 07:35 分类:问答