-
-
Save zmoazeni/0049f3ab365ae600b131 to your computer and use it in GitHub Desktop.
This file contains 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
import Control.Lens | |
import Data.Tree | |
import Data.Tree.Lens | |
testTree :: Tree Integer | |
testTree = Node 1 [ Node 2 [ Node 4 [ Node 6 [], Node 8 [] ], | |
Node 5 [ Node 7 [], Node 9 [] ] ], | |
Node 3 [ Node 10 [], | |
Node 11 [] ] | |
] | |
main = putStr $ drawTree $ fmap show $ testTree | |
zipperTree = zipper testTree | |
-- fails to run/compile with FromBlogPost.hs:14:14: Not in scope: ‘zipper’ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment