Created
July 18, 2022 18:08
-
-
Save agocke/1eeb2bd9d2a43a4464dd5aad53c61c1d 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
interface IWebApplication<abstract TResult> | |
{ | |
TResult MapGet(string route, Func<TResult, TResult> f); | |
} | |
class NotFound : IResult { } | |
class OK<TValue> : IResult { } | |
class MyWebApp : IWebApplication<IResult> | |
{ | |
IResult MapGet(string route, Func<TResult, TResult f) => f(OK<int>(200)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment