### Context
I'm writing a function that look something like:
triDiagonalQ[mat_] := MapIndexed[ #1 == 0 || Abs[#2[[1]]-#2[[2]]] <= 1 &, mat, {2}] //
Flatten // And @@ # &
Now, things like `#2[[1]]` and `#2[[2]]` are somewhat hard to read. I'd prefer to do something like:
triDiagonalQ[mat_] := MapIndexed[ #1 == 0 || Abs[i-j] <= 1 &, mat, {2}] //
Flatten // And @@ # & (* with a {i, j} <- #2 somewhere *)
### Question
Is there someway to do something like "destructuring" in *Mathematica*?
---
The following links convey what I mean by "destructuring":
* http://clojure.org/special_forms
* http://java.dzone.com/articles/clojure-destructuring
* http://blog.jayfields.com/2010/07/clojure-destructuring.html
(These have nothing to do with *Mathematica*; they're posted mainly to demonstrate what is meant by "destructuring")