Comment

Comment by assbuttbuttass

It's (sadly) still not possible to express monads with this change, since generic methods can't implement interfaces. You'd probably want something like:

    type Monad[T any] interface {
        Bind[U any](func(T) Monad[U])
    }
However this requires the Bind method to be generic, which still isn't allowed in an interface

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton