Copyright | Copyright (C) 2021 Yoo Chung |
---|---|

License | GPL-3.0-or-later |

Maintainer | dev@chungyc.org |

Safe Haskell | Safe-Inferred |

Language | GHC2021 |

Part of Ninety-Nine Haskell Problems. Some solutions are in Solutions.P65.

# Documentation

layoutLevelConstant :: Tree a -> Tree (a, (Int, Int)) Source #

An alternative layout method is depicted in the illustration below:

Find out the rules and write the corresponding function. Use the same conventions as in Problems.P64.

### Examples

`>>>`

Branch ('n',(15,1)) (Branch ('k',(7,2)) (Branch ('c',(3,3)) ...`layoutLevelConstant tree65`

### Hint

On a given level, the horizontal distance between neighboring nodes is constant.