3 ms·
I run a few startups on Haskell. Most of the work is boring imperative stuff. While it sounds like the company interviewing you were probing to see if you under
by yakshaving_jgt 7y ago
I run a few startups on Haskell. Most of the work is boring imperative stuff. While it sounds like the company interviewing you were probing to see if you understand traversals and bifunctors, your proposed solution would have been given a thumbs up in code review on my team.
FWIW, I would have written your function as
f = bitraverse id id
No "double nested flatMap lambda contraption" necessary.
Ah, it looks like you can even just use `bisequence`, which is equivalent to `bitraverse id id`. So you didn't actually need to implement anything!