You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to accumulate deserializing errors, and avoid short-circuiting behavior.
I have found applicative functors, but I don't know how to use that on string[] and harvest errors.
staticAff<RT,Unit> saveToDb =>(fromfilesin Eff(()=> Directory.GetFiles(@"c:\test\","*-*-*-*-*.txt"))frommidsin SuccessEff(files.Map(deserialize))// deserialize can fail, so I would like to know which paths were failedfrom_inConsole<RT>.writeLine(string.Join(',', mids.Lefts()))selectunit)| @catch(error =>Console<RT>.writeLine(error.Message));staticEither<Error,Mid0061> deserialize(stringpath)=> ...
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I would like to accumulate deserializing errors, and avoid short-circuiting behavior.
I have found applicative functors, but I don't know how to use that on
string[]
and harvest errors.Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions