folks, if my main "method" is ultimately described as a
Task[Unit] it is a sane thing to just
mainTask.runSyncUnsafe(Duration.Inf), at the end of the world right? Or is there a better way of running your final app?
Until recently I had
cats.effect.IO, but for various reasons wound up changing it to monix
Task, and w/
IO I just did the
mainIO.unsafeRunSync — worked fine.
Foldableallows you to use abstract types instead of specifying a specific Scala collection itself
foldMap(t => Map(t.k -> List(t.v)))
User(k: Age, v: Name)
case class Students(name: String, classID: String)
Map[String, (Int, List[Student])]