Skip to content

Instantly share code, notes, and snippets.

@zmoazeni
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zmoazeni/0049f3ab365ae600b131 to your computer and use it in GitHub Desktop.
Save zmoazeni/0049f3ab365ae600b131 to your computer and use it in GitHub Desktop.
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