Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
pp:2024:l09 [2024/04/29 08:43]
tpruteanu
pp:2024:l09 [2024/04/29 15:57] (current)
tpruteanu
Line 151: Line 151:
 -- This is an infinite data type, no way to stop generating the tree -- This is an infinite data type, no way to stop generating the tree
 data StreamBTree = StreamNode Int StreamBTree StreamBTree data StreamBTree = StreamNode Int StreamBTree StreamBTree
 +
 +sbtree = StreamNode 1 sbtree sbtree
  
 </​code>​ </​code>​
Line 159: Line 161:
  
 {- {-
-> sliceTree 2 (repeatTree 3)+> sliceTree 2 sbtree
  
-       3+       1
        |        |
    ​---------    ​---------
    ​| ​      |    ​| ​      |
-         ​3+         ​1
  ​----- ​  ​----- ​  ​----- ​  ​----- ​
  ​| ​  ​| ​  ​| ​  |  ​| ​  ​| ​  ​| ​  |