foldMap

inline fun <B> foldMap(MB: Monoid<B>, f: (A) -> B): B

Deprecated

This API is niche and will be removed in the future. If this method is crucial for you, please let us know on the Arrow Github. Thanks! https://github.com/arrow-kt/arrow/issues Prefer when or fold instead

Replace with

MB.run { this.fold({ empty() }) { a -> empty().combine(f(a)) } }