Type Driven Development With Idris
Mr. Seth McClure
—
an express precise requirements. For instance, a function to get the head of a non-empty vector: ```idris head : Vect (S n) a -> a head (x :: xs) = x ``` The type `Vect (S n) a` guarantees the vector is non-empty, so the function never needs to handle an empty case. This eliminates a comm