Skip to content

Instantly share code, notes, and snippets.

Ivan Zlatev ivanz

Block or report user

Report or block ivanz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
dvdsgl / Monads for a C#
Last active Sep 17, 2019
Monads explained (sort of) to a C# developer
View Monads for a C#

A monad is a fancy word for a generic type of the form MyMonad<T> (a generic type of arity 1).

A monad is special because it adds 'special powers' to the T that it wraps. These 'special powers' won't sound very special to an imperative programmer, so you have to squint to see them but bear with me.

  • IEnumerable<T> is a monad that gives values of type T the special power of nondeterminism, or the ability to 'be' multiple values at once.
  • Nullable<T> is a monad that gives values of type T the special power of nullability, or the ability to be absent.
  • Task<T> is a monad that gives values of type T the special power of asynchronicity, or the ability to be used before they are computed.

The trick with monads comes when you want to play with the T values, because they are inside another type. C# introduced language changes to make dealing with values inside these monads easier:

BPScott /
Last active Jun 19, 2019
Github suggestion: Per-organization email overrides

This totally happened, y'all can stop +1ing this now. GitHub Blog post. Direct link to settings where you can set this.

#Per-organization / per-repo email overrides - A feature suggestion

Here the concepts "organization" and "user" are interchangeable, I'm talking about an entity that owns a repo, whether it is jQuery or John Resig. I'll stick to using organization as it best represents my original use-case.


You can’t perform that action at this time.