package Ġchapter 0 4 . conditional Ċ Ċ import Ġcommon . Log Ċ import Ġcommon . Shape Ċ import Ġio . reactivex . Observable Ċ Ċ class ĠAll Function Example Ġ{ ĊĠĠĠ Ġfun Ġmar ble Diagram () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġdata Ġ= ĠarrayOf (" 1 ", Ġ" 2 ", Ġ" 3 ", Ġ" 4 ") ĊĊĠĠĠĠĠĠĠ Ġval Ġsource Ġ= ĠObservable . from Array (* data ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. map ( Shape () :: get Shape ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. all ( Shape (). B ALL :: equals ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ// Ġ. all Ġ{ Ġvalue Ġ-> ĠShape (). B ALL Ġ== ĠShape (). get Shape ( value ) Ġ} ĊĊĠĠĠĠĠĠĠ Ġsource . subscribe Ġ{ Ġvalue Ġ-> ĠLog . it ( value ) Ġ} ĊĠĠĠ Ġ} Ċ } Ċ Ċ fun Ġmain () Ġ{ ĊĠĠĠ Ġval Ġdemo Ġ= ĠAll Function Example () ĊĠĠĠ Ġdemo . mar ble Diagram () Ċ }