7 | Node (BTree a) a (BTree a)
9implementation Show a => Show (BTree a) where
11 show (Node l x r) = "[" ++ show l ++ " "
15testTree : BTree String
16testTree = Node (Node Leaf "Jim" Leaf)
18 (Node (Node Leaf "Alice" Leaf)
20 (Node Leaf "Bob" Leaf))
22treeTagAux : BTree a -> { [STATE Int] } Eff (BTree (Int, a))
23treeTagAux Leaf = pure Leaf
24treeTagAux (Node l x r)
25 = do l' <- treeTagAux l
29 pure (Node l' (i, x) r')
31treeTag : (i : Int) -> BTree a -> BTree (Int, a)
32treeTag i x = runPure (do put i
35treeTagIO : (i : Int) -> BTree a -> IO (BTree (Int, a))
36treeTagIO i x = run (do put i
40main = print (treeTag 1 testTree)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list