Last active
October 21, 2016 15:16
-
-
Save expede/a1e60c3041bf5aeeb1d6f0198e0579e8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{- | |
Vectors are fixed-length data structures | |
They're written in this format: `Vect length type` | |
ex. `Vect 3 Int` could represent [1,2,3], but not [1,2] or ['a', 'b', 'c'] | |
-} | |
concat : Vect lengthX a -> Vect lengthY a -> Vect (lengthX + lengthY) a | |
concat Nil ys = ys | |
concat (x :: xs) ys = x :: app xs ys | |
-- ie: take the lengths of two vetcors, | |
-- and the result must have the length of the two combined |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment