Replies: 1 comment
-
Another way I can do this I want to share is having a mini operator language : now people can write let newobj (f : b -> c) = old |????|*|*|> f and because we had concat functions already for options (which is I can use the operator in my code today by implementing it myself, it will be reusable for similar situations, but the sourcegen can generate although letting people write My thought is ultimately reducing noise for monad and making the experience of writing monad better, for people to enjoy an expressiveness monad brings |
Beta Was this translation helpful? Give feedback.
-
imagine you have an unknown amount of Async inside Async, with the final type inside async being
Async<'b voption> seq
, now imagine a single operator to bind it to a function that works with'b seq
in my opinion that's doable via insane operator overload, or maybe if fsharp language supports 'marking' a convertor that gives you what's useful, for example Some in Option and 'a in Async<'a>, with this information we can have an operator that always let you work on what's useful
Alternatively, because you might want to control how Async<'a> seq is enumerated, maybe in parallel maybe in single thread, let is enable building such operator by binding 'rules' together from the fsharp core library
so such operator can be built for example :
now you are always working with what's useful in the binding function
Beta Was this translation helpful? Give feedback.
All reactions