diff --git a/src/Freya.Core/Prelude.fs b/src/Freya.Core/Prelude.fs index 9555c4b..6b6ecf5 100644 --- a/src/Freya.Core/Prelude.fs +++ b/src/Freya.Core/Prelude.fs @@ -109,6 +109,9 @@ module Option = let mapLens (l: Lens<'a,'b>) : Prism<'a option,'b> = Option.map (fst l), snd l >> Option.map + let bindLens (p : Lens<'a, 'b option>) : Lens<'a option, 'b option> = + Option.bind (fst p), snd p >> Option.map + // Constants /// Literal constants for the values of keys within the OWIN environment, @@ -309,4 +312,4 @@ module Constants = let [] ClientCloseStatus = "websocket.ClientCloseStatus" [] - let [] ClientCloseDescription = "websocket.ClientCloseDescription" \ No newline at end of file + let [] ClientCloseDescription = "websocket.ClientCloseDescription"