Remix.run Logo
Asraelite 11 hours ago

https://tech.nextroll.com/blog/dev/2022/11/11/exploring-mona...

The thing that always makes FP concepts click for me is seeing them explained in a language that isn't Haskell or similar.

I don't know why people are so obsessed with using Haskell for tutorials. Its syntax is a nightmare for newcomers and you can do FP in so many other languages.

mrkeen 10 hours ago | parent [-]

For instance, C#:

  public static System.Collections.Generic.IEnumerable<TResult> SelectMany<TSource,TCollection,TResult>(this System.Collections.Generic.IEnumerable<TSource> source, Func<TSource,System.Collections.Generic.IEnumerable<TCollection>> collectionSelector, Func<TSource,TCollection,TResult> resultSelector);
compared to:

  (>>=) :: m a -> (a -> m b) -> m b
Guess which one I googled, and which one I typed from memory.
mrsmrtss 9 hours ago | parent | next [-]

In your c# sample full namespaces are unnecessary and will add only noise in this context.

9 hours ago | parent | prev [-]
[deleted]