Last active
August 17, 2020 11:07
-
-
Save kryptt/af0a626849f0e3f5b16fcd161a5545e4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val BalanceSheetId: Lens[BalanceSheet, DatabaseID] = | |
GenLens[BalanceSheet](_.id) | |
def save(sheet: BalanceSheet): IO[DatabaseID] = ??? | |
//Updates a given sheet with the new id from the database | |
def store(sheet: BalanceSheet): IO[BalanceSheet] = | |
save(sheet).map(BalanceSheetId.set(_)(sheet)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment