This is about the wording in the haddock comment
https://hackage-content.haskell.org/package/vector-0.13.2.0/docs/Data-Vector.html#v:fromListN
Convert the first n elements of a list to a vector. It's expected that the supplied list will be exactly n elements long.
What is the meaning of "expected"? What happens when the expectation is not met?
- list longer than n: seems to work fine: builds vector from the n-element prefix, as stated in first sentence
V.fromListN 4 "foobar" => "foob"
- list shorter than n: builds vector from full list, consistent with behaviour of Data.List.take
V.fromListN 8 "foobar" => "foobar"
This is about the wording in the haddock comment
https://hackage-content.haskell.org/package/vector-0.13.2.0/docs/Data-Vector.html#v:fromListN
What is the meaning of "expected"? What happens when the expectation is not met?
V.fromListN 4 "foobar" => "foob"V.fromListN 8 "foobar" => "foobar"