Mercurial > hg > Members > toma > Jungle-haskell
comparison test/test.hs @ 10:29d0f605efa9
add updateRootNodeWith
author | Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 21 Jan 2014 15:51:34 +0900 |
parents | 947c5cfa4149 |
children | 74a4c7cdc50b |
comparison
equal
deleted
inserted
replaced
9:947c5cfa4149 | 10:29d0f605efa9 |
---|---|
22 addattr = | 22 addattr = |
23 (adda [1,1] "key" "value") . (adda [1,1] "test" "test2") . | 23 (adda [1,1] "key" "value") . (adda [1,1] "test" "test2") . |
24 (adda [] "root" "node") . (adda [1] "tes" "abc") . | 24 (adda [] "root" "node") . (adda [1] "tes" "abc") . |
25 (adda [3,2] "test" "3-2") . (adda [2,2] "test" "2-2") | 25 (adda [3,2] "test" "3-2") . (adda [2,2] "test" "2-2") |
26 | 26 |
27 add :: Node -> Node | |
27 add = addattr . addchild | 28 add = addattr . addchild |
29 | |
30 putNode = putStrLn . drawNode | |
31 putAttr = putStrLn . printAttributes | |
32 | |
28 | 33 |
29 {- | 34 {- |
30 ghci> :l test.hs | 35 ghci> :l test.hs |
31 ghci> y <- tree | 36 ghci> y <- tree |
32 ghci> putStrLn $ printAttributes y | 37 ghci> putStrLn $ printAttributes y |