Created
August 24, 2017 07:50
-
-
Save CoditCompany/103d1872284da39bda997944276ec7cf to your computer and use it in GitHub Desktop.
PipeTo extension
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
| /// <summary> | |
| /// Extensions to support Functional Concepts | |
| /// </summary> | |
| public static class FunctionalConcepts | |
| { | |
| /// <summary> | |
| /// Pipes a given <paramref name="value"/> to given function <paramref name="f"/>. | |
| /// </summary> | |
| /// <typeparam name="TA">The type of a.</typeparam> | |
| /// <typeparam name="TB">The type of the b.</typeparam> | |
| /// <param name="value">The value.</param> | |
| /// <param name="f">The function.</param> | |
| /// <returns></returns> | |
| public static TB PipeTo<TA, TB>(this TA value, Func<TA, TB> f) | |
| { | |
| return f(value); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment