daily pastebin goal
41%
SHARE
TWEET

Untitled

a guest Jul 18th, 2018 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. :: samefringe
  2. ::
  3. ::  plan:  descend / recurse until each side hits a leaf, then compare.
  4. ::         If not equal, fail immediately.
  5. ::         If equal,
  6. ::
  7. ::        .                     .
  8. ::      /  \                   /  \
  9. ::  => 1   .              =>  .    3
  10. ::        /  \               / \
  11. ::      2    3               1   2
  12. ::
  13. ::
  14. ::
  15. ::
  16. ::
  17. |=  [a=* b=*]
  18. ^-  @
  19. 12
  20. ::  ?: ?=(@ a)
  21. ::    ?: ?=(@ b)
  22. ::      3 ::=(a b)          :: degenerate case: we're comparing leaf X with leaf X
  23. ::    4 :: $(a a, b -:b)
  24. ::  5 :: $(a -:a, b -:b)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top