Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def cc (e : Element, c : Couleur) : Element = {
- e match {
- case Bouton(_) => new Bouton(c)
- case Boite(x) => new Boite(x.map(cc(_, c)))
- }
- }
- def t (e : Element) : Set[Couleur] = {
- e match {
- case Bouton(x) => Set(x)
- case Boite(x) => {var s = Set[Couleur](); for (i <- x.map(t)) {s = s.union(i)}; s}
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement