Last active
April 4, 2016 20:20
-
-
Save maiermic/9440758a27312ba09988ffca90a48bee to your computer and use it in GitHub Desktop.
reverse Data.HVect in Idris
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
| module reverse_hvect | |
| import Data.HVect | |
| reverse : HVect ts -> HVect (reverse ts) | |
| reverse [] = [] | |
| reverse (x::xs) = (reverse xs) ++ [x] |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I try to reverse a
Data.HVectbut my code results in an error:An example how
reverseshould work: