Advertisement
Guest User

Untitled

a guest
Jul 3rd, 2017
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
REBOL 0.33 KB | None | 0 0
  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. ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement