Skip to content
Discussion options

You must be logged in to vote

Pretty sure all of this is covered with the previous replies. Did you try them?

But using your example, with some added Console.WriteLine logging, you can see it implemented (as in the previous reply) using Sequence and Traverse. Sequence being slightly more concise.

using LanguageExt;
using LanguageExt.Common;
using static LanguageExt.Prelude;

var werte = new List<string> { "adsghdf", "sadghdfjds", "fail", "872r87" };
var result1 = Process1(werte);
var result2 = Process2(werte);

Console.WriteLine(result1);
Console.WriteLine(result2);

Fin<Unit> Process1(List<string> inputValues) =>
    inputValues.Sequence(Calc).Map(_ => unit);

Fin<Unit> Process2(List<string> inputValues) =>
    input…

Replies: 3 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@dirkil
Comment options

@louthy
Comment options

@louthy
Comment options

Comment options

You must be logged in to vote
2 replies
@louthy
Comment options

Answer selected by dirkil
@dirkil
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #1261 on October 20, 2023 21:50.