Advertisement
Guest User

Untitled

a guest
Jan 20th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. (
  2. (a (b c)),
  3. (b (a c)),
  4. (c (a b d)),
  5. (d (c))
  6. )
  7.  
  8. (
  9. (a (b 1.0 c 2.0)),
  10. (b (a 1.0 c 1.0)),
  11. (c (a 1.3 b 7.2 d 10.5)),
  12. (d (c -10.5))
  13. )
  14.  
  15. (
  16. (a (b 1.0 c 2.0)),
  17. (b (a 1.0 c 1.0)),
  18. (c (a 1.3 b 7.2 d 10.5)),
  19. (d (c -10.5))
  20. )
  21.  
  22. (define (get-vertices graph) ;; gets all the vertices from a graph
  23. ...)
  24.  
  25. (define (get-edges graph) ;; gets all the edges from a graph
  26. ...)
  27.  
  28. (define (get-weight vertex-from vertex-to) ;; get the weight of a specific vertex
  29. ...)
  30.  
  31. {
  32. :a {:b 3 :c 4}
  33. :b {:a 1}
  34. :c {}
  35. }
  36.  
  37. (defclass tree ()
  38. ((node :accessor node :initarg :node)
  39. (children :accessor children :initarg :children)))
  40.  
  41. data Tree a = Null | Node Tree a Tree
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement