Skip to main content
Share Your Experience: Take the 2024 Developer Survey

All Questions

Filter by
Sorted by
Tagged with
1 vote
0 answers
69 views

Does Subscribe sound as a right name?

So I have a Know Your Customer provider interface like this to estimate risks associated with a customer: ...
Dmitry Nogin's user avatar
  • 6,131
3 votes
1 answer
128 views

Writing pure functions but have a chain

I'm trying to play around with Godot to learn C# and I was trying to creating pure functions to do the velocity, but I found I was repeating myself. ...
Archimedes Trajano's user avatar
2 votes
0 answers
103 views

LINQ extensions for sequence comparing

The desired behavior would be: ...
Dmitry Nogin's user avatar
  • 6,131
7 votes
2 answers
345 views

Chaining statistics in a dice queue

I've previously came up with the question "Rolling dice in a method chain" and was interested if this could be improved. It could, so now I have this class: ...
Wim ten Brink's user avatar
8 votes
3 answers
1k views

Rolling dice in a method chain

I've been writing code for nearly 40 years now and am still not too old to learn and understand new things. Right now, my focus is a bit of OO with functional programming combined and C# with Linq is ...
Wim ten Brink's user avatar
12 votes
2 answers
2k views

Given an array A[] and a number x, check for pair in A[] with sum as x

LINQ/FP style: Assert.IsTrue(new[] {1,2,3}.AnyPairSum(4)); Where: ...
Dmitry Nogin's user avatar
  • 6,131
5 votes
0 answers
134 views

Implement Sudoku using LINQ

WiKi and GitHub. Sudoku rules are being checked with the following tests: ...
Dmitry Nogin's user avatar
  • 6,131
4 votes
1 answer
403 views

Paginate IEnumerable<T> sequence

I used the following to split sequence into batches: ...
Dmitry Nogin's user avatar
  • 6,131
7 votes
1 answer
340 views

String Format object extension

I wrote an extension to create a string-representation by an object: ...
Matthias Burger's user avatar
6 votes
3 answers
433 views

Generic method to call API functions with simple retrial on errors

I have to develop a small security management application that relies on a Web API. Based on that API, I have generated the REST client classes (Open API generator), but I still have to code on top to ...
Alexei's user avatar
  • 1,806
5 votes
1 answer
311 views

Make utility using LINQ

Make() takes projects with a list of tuples representing project references in the form of (Dependency, Dependent) and returns ...
Dmitry Nogin's user avatar
  • 6,131
0 votes
1 answer
100 views

Managing locking for access

I've been working for a while on locking resources (state objects) so that the only way to access them is by acquiring a lock. This moves the responsibility for locking from the user of the state to ...
kofifus's user avatar
  • 111
4 votes
2 answers
600 views

Tax calculator using functional programming

...
parag's user avatar
  • 141
2 votes
0 answers
60 views

Monadic implementation of asynchronous tasks (hidden overhead of threads)

So, I've been reading about monads and I wanted to see if I could implement a system for asynchronous computation in a monadic way. I came up with two solutions: The first one spawns a thread for ...
markonius's user avatar
  • 121
7 votes
1 answer
122 views

Monadic list for a more functional approach to C#

I am learning about monadic structures and have created a sort of monad list that implements the map and binding "operators" (or technically methods) in C#. I understand that Linq already exists and ...
NaN's user avatar
  • 205

15 30 50 per page