concept len1 in category idris

appears as: len1
Type-Driven Development with Idris

This is an excerpt from Manning's book Type-Driven Development with Idris.

  • Type— Looking at the type of ?zipInputs_rhs, you can see the types (and hence the lengths) of the vectors that have been read:
      len2 : Nat
      vec2 : Vect len2 String
      len1 : Nat
      vec1 : Vect len1 String
    --------------------------------------
    zipInputs_rhs : IO ()
    vec1 has length len1, and vec2 has length len2; there’s no explicit relationship between these lengths. Indeed, there shouldn’t be, because they were read independently. But if you look at the type of zip, you’ll see that the lengths must be the same before you can use it:
    zip : Vect n a -> Vect n b -> Vect n (a, b)