Hacker News new | ask | show | jobs
by steveklabnik 2183 days ago
... and you could write

  fn f(x: &[i32]) -> bool {
      x.len() == 3 && x[0] == x[1]
  }
if you wanted. Honestly, I probably would.