Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- compressQTree i t = if(((depthQTree t) - i) < 0)
- then let (x,y) = sizeQTree t in (Cell (searchCell t) x y)
- else anaQTree f ((depthQTree t) - i, t)
- where f (_, (Cell a b c)) = i1(a, (b, c))
- f (0, s@(Block a b c d)) = let (x,y) = sizeQTree s in i1 ((searchCell a), (x, y))
- f (n, (Block a b c d)) = i2( (n-1 , a) , ((n-1 , b), ((n-1 , c), (n-1 , d))))
- searchCell = cataQTree (either g1 g2)
- where g1 (a,(b, c)) = a
- g2 (a,(b,(c,d))) = a
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement