encap: Provide default implementation of mat_apply.
Untabify.
Merge pull request #50 from memmett/feature/default-mat-apply

Provide default implementation of `mat_apply`.