b'\n_START_ARTICLE_\nCommand\n_START_SECTION_\nImplementace v jazyce Scala\n_START_PARAGRAPH_\ntrait Operace {_NEWLINE_   def spustit()}_NEWLINE_ _NEWLINE_class Vypinac {_NEWLINE_   private var historie: List[Operace] = Nil_NEWLINE_ _NEWLINE_   def provest(cmd: Operace) {_NEWLINE_      cmd.spustit()_NEWLINE_      this.historie :+= cmd_NEWLINE_   }}_NEWLINE_ _NEWLINE_class Zarovka {_NEWLINE_   def zapnout() = println("Sviti")_NEWLINE_   def vypnout() = println("Nesviti")}_NEWLINE_ _NEWLINE_class ZapnoutZarovku(zarovka: Zarovka) extends Operace {_NEWLINE_   def spustit() = zarovka.zapnout()}_NEWLINE_ _NEWLINE_class VypnoutZarovku(theLight: Light) extends Operace {_NEWLINE_   def spustit() = zarovka.vypnout()}_NEWLINE_ _NEWLINE_object ZkouskaZarovky {_NEWLINE_   def main(args: Array[String]) {_NEWLINE_      val zarovka = new Zarovka()_NEWLINE_      val zapnout = new ZapnoutZarovku(zarovka)_NEWLINE_      val vypnout = new VypnoutZarovku(zarovka)_NEWLINE_      val vypinac = new Vypinac()_NEWLINE_      vypinac.provest(zapnout);_NEWLINE_      vypinac.provest(vypnout);_NEWLINE_      vypinac.provest(zapnout);_NEWLINE_      vypinac.provest(vypnout);_NEWLINE_   }}'