a guest Jul 3rd, 2017 124 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Sorter: func [List /local Piv OnPiv][
  2.    if 2 > length? List [return List]
  3.    Piv: List/1
  4.    OnPiv: array/initial (subtract (length? List) (length? remove-each I copy List [I = Piv])) Piv
  5.    return compose [
  6.       (Sorter remove-each I copy List [I >= Piv])
  7.       (OnPiv)
  8.       (Sorter remove-each I copy List [I <= Piv])
  9.    ]
  10. ]
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