---
source: crates/aiken-lang/src/tests/format.rs
description: "Code:\n\nvalidator thing ( ) {\n// What is the purpose of life\n\nspend(d: Datum, r: Redeemer, ctx: ScriptContext) -> Bool {\nTrue\n}\n}\n\n// What?\nvalidator foo {\n  /// Some documentation for foo\n  foo() {\n    Void\n  }\n\n  // I am lost\n}\n"
---
validator thing {
  // What is the purpose of life

  spend(d: Datum, r: Redeemer, ctx: ScriptContext) {
    True
  }

  else(_) {
    fail
  }
}

// What?
validator foo {
  /// Some documentation for foo
  foo() {
    Void
  }

  else(_) {
    fail
  }

  // I am lost
}
