3 ms·
Though the right comparison is default <T> Extension<T> contraMap(Function<T, S> f) foldMap :: Monoid m => (a -> m) -> t a -> m I also prefer the Haskel
by hyperpape 11y ago
Though the right comparison is
default <T> Extension<T> contraMap(Function<T, S> f)
foldMap :: Monoid m => (a -> m) -> t a -> m
I also prefer the Haskell syntax, but it looks like more of a difference because the implementation is inline.
- deleted 11y ago[deleted]
- logicrook 11y agoTo be fair, I afterwards thought that for some people, especially when taught with OOP, would see some functional abstractions as obfuscation. Each type of abstraction (objects, higher-order functions or continuations) work best with specifically designed syntax. I didn't like Scala too much for this reason, as it seemed a too bizarre combination (from a syntactic POV), as a contrast with Ocaml. Anyway, tastes and education play a role there, but to me the arrow notation is way easier to read, as it is what I would write on paper.