Created
February 22, 2024 09:15
-
-
Save stijnmoreels/fccc90952028fd966f97a556d8e8bf88 to your computer and use it in GitHub Desktop.
This file contains 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
// Guest -> GuestList -> ValidationResult<GuestList> | |
let add guest list = | |
Optic.map guests_ (fun gs -> g :: gs) | |
// Guest -> GuestList -> ValidationResult<GuestList> | |
let remove guest list = | |
Optic.get (guest_ guest.Name) list | |
>>= fun g -> Optic.map guests_ (List.except [g]) list |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment