---
source: crates/aiken-lang/src/tests/format.rs
description: "Code:\n\nvalidator foo(Foo { a, b, .. }) {\n    spend() { todo }\n}\n\nvalidator foo([Bar] : List<Bar>) {\n    spend() { todo }\n}\n\nvalidator foo((Baz, Baz) as x) {\n    mint() { todo }\n}\n\nvalidator fiz((fst, snd) as x: Pair<Int, Int>) {\n    spend() { todo }\n}\n"
---
validator foo(Foo { a, b, .. }) {
  spend() {
    todo
  }

  else(_) {
    fail
  }
}

validator foo([Bar]: List<Bar>) {
  spend() {
    todo
  }

  else(_) {
    fail
  }
}

validator foo((Baz, Baz) as x) {
  mint() {
    todo
  }

  else(_) {
    fail
  }
}

validator fiz((fst, snd) as x: Pair<Int, Int>) {
  spend() {
    todo
  }

  else(_) {
    fail
  }
}
