type MapReaderOrOption[A] = ReaderT[Option, Map[String,String], A]
I can create it from ReaderT.apply:
def f:MapReaderOrOption[Int] = ReaderT(_ => Option(10))
From A type via type enrichment and pure method:
import cats.Applicative
import cats.syntax.int._
def f:MapReaderOrOption[Int] = 10.pure[MapReaderOrOption]
I'd like to find something similar. Each time to use ReaderT(..) not so convenient. For sure, I can create a helper method. The question, are there other options?
Expected something like:
def f:MapReaderOrOption[Int] = Option(10).asReaderT[MapReaderOrOption]