Functional programming and dependency inversion: how to abstract storage?
问题 I'm trying to create a solution that has a lower-level library that will know that it needs to save and load data when certain commands are called, but the implementation of the save and load functions will be provided in a platform-specific project which references the lower-level library. I have some models, such as: type User = { UserID: UserID Situations: SituationID list } type Situation = { SituationID: SituationID } And what I want to do is be able to define and call functions such as: