protocol Taskable {
    func execute()
    var description: String { get }
}

enum LayerActions {
    case scale(width: Double, height: Double)
    case rotate(degrees: Double)
    case fill(hex: String)
}

extension LayerActions: Taskable {
    func execute() {
        switch self {
        case .scale(let width, let height):
            print("Executes scale action")
        case .rotate(let degrees):
            print("Executes rotate action")
        case .fill(let hexColor):
            print("Executes fill action")
        }
    }
    
    var description: String {
        switch self {
        case .scale(let width, let height):
            return "Scales the layer to \(width)x\(height)"
        case .rotate(let degrees):
            return "Rotates the layer \(degrees) degrees"
        case .fill(let hexColor):
            return "Fills the layer with \(hexColor) color"
        }
    }
}