0
comment
comment
on 9/5/2020 8:11 AM
One of the questions around how to write F# is how do we compose bigger business applications. In C# you generally use constructor injection.
Let us start by defining some base functions types and environment that we will use in later code samples:
open FSharpPlus
open FSharpPlus.Data
type IUserRepository =
abstract GetUser : email : string -> Async<string>
type IShoppingListRepository =
abstract Add : shoppingList : string list -> string list
type Env() =
interface IUserRepository with
[...]