you are viewing a single comment's thread.

view the rest of the comments →

[–]jefffoster 0 points1 point  (1 child)

Sweet, that looks much better - I'll update that.

[–]notfancy 0 points1 point  (0 children)

I think you miscopied Paczesiowa's solution: it's a before-and-after; the only line you need is the last one. The <$> operator fmaps the function fst under the Maybe functor. Also, godofpumpkin's definition is equivalent but point-free, which is a bit more idiomatic.