HeroBaga

Untitled

Oct 21st, 2021
607
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (define (BST t level)
  2.   (cond
  3.     [(empty? (second t)) ""]
  4.     [else (BST (second t) (+ 1 level))]
  5.   )
  6.       (display (~a (first t)  #:min-width (* 4 level) #:align 'center))
  7.     (newline)
  8.    
  9.   (cond
  10.     [(empty? (third t)) ""]
  11.     [else (BST (third t) (+ 1 level))]
  12.   )
  13. )
  14.  
  15.  
  16.  
  17. (BST '(1 (0 () ()) (10 (5 () ()) (17 (12 () ()) (20 (19 () ()) ())))) 0)
RAW Paste Data