1/3 Earlier this year, I published BuildConstants. It solves a simple problem: define C# constant from MSBuild items. github.com/atifaziz/BuildCon…
1
1
85
4/5 Finq can also give you fallible functions naturally by just using the `where` clause from LINQ:
1
135
3/5 However, with anonymous types, you don't have even have the option to specify the type argument, but Finq can help:
1
21
2/5 But wait, why would anyone in their right mind want to do that? Sometimes it can help when the compiler can't infer a type argument, like for a curried function:
1
25
1/5 Here's a (peculiar) idea…writing & combining C# functions (`Func<,>`) entirely with LINQ, as if you didn't have `=>` in the language. Introducing Finq: github.com/atifaziz/Finq or F(unq) + (L)inq
1
1
231
Replying to @RickStrahl
Use Thread with TaskCompletionSource for signaling + Task? Seems to be cleanest & simplest way I can think of right now. As a Gist for prosperity: gist.github.com/atifaziz/6d1…
2
49
Didn't know what to post so for whatever it's worth, this is my #GitHubUnwrapped! ¯\_(ツ)_/¯ Get your own: githubunwrapped.com
1
238
Replying to @raboof @CFDevelop
Simple example of monad (sequential composition) in action with Optuple and equivalent imperative version:
2
32
C# 10 added natural type for lambda expressions, making curried functions more readable & easier to express (almost like Hindley–Milner signatures) than the explicit typing and angle sandwiches needed previously with “Func<int, Func<int, …>>>”. 😅
3
381
Replying to @ardalis
One interesting bit about the Guard.Against returning the validated value is it's future-ready for primary constructors landing in C# 12. 😉
1
4
588
My first SO answer in years showing how MoreLINQ's TraverseBreadthFirst can be used for JsonNode to get the same functionality as Json.NET's DescendantsAndSelf with a simple switch expression: stackoverflow.com/a/76757619…. There's more explored in the answer.
200












