Aaron M. Eshbach
  • Member for 4 years
  • Last seen more than a month ago
F# Either computation expression with while loop
Accepted answer
5 votes

There are a few things I would probably add or change about your implementation. When I create a new computation builder, I typically put the logic in a module, and then just call the functions in ...

View answer
Selective updates to immutable types
2 votes

I like Denis's answer as a C# solution. However, if you could implement this part of your system in F#, you could make this really easy on yourself and still provide interoperability with your other ...

View answer
method to get finger mask based on finger position
Accepted answer
2 votes

Yes, this can be done simply by using a power of 2. private int getFingerMask(int fingerPosition) { if (fingerPosition >= 0 && fingerPosition < 10) { return (int)Math....

View answer
Async method with three internal tasks
2 votes

An efficient way of doing this (if you don't care about the overhead on the data stores) would be to start all three tasks, then return when the first of the tasks produces a non-null value. ...

View answer
Dispatch multiple publishers to single handler with result
1 votes

A few comments: var handler = Container.GetInstance<IMessageHandler<TMessage, TReply>>(); You're looking up the IMessageHandler inside the handler block, which means you're looking it up ...

View answer