Monaden & Co. Funktionale Konzepte in Scala - Lars Hupel
Monaden & Co. Funktionale Konzepte in Scala - Lars Hupel
Monaden & Co. Funktionale Konzepte in Scala - Lars Hupel
Sie wollen auch ein ePaper? Erhöhen Sie die Reichweite Ihrer Titel.
YUMPU macht aus Druck-PDFs automatisch weboptimierte ePaper, die Google liebt.
Typsichere Formatierungtype Formattable[T] = T => Str<strong>in</strong>gtrait Formatter[Params Str<strong>in</strong>g) { self =>def :~:[T](f: Formattable[T]):Formatter[H<strong>Co</strong>ns[T, Params]] =new Formatter[H<strong>Co</strong>ns[T, Params]] {def apply(params: H<strong>Co</strong>ns[T, Params]):Str<strong>in</strong>g =f(params.head) + self(params.tail)}}<strong>Monaden</strong> & <strong>Co</strong>. – <strong>Lars</strong> <strong>Hupel</strong> <strong>Co</strong>pyright © 2011 MATHEMA Software GmbH 54