# rb: add sort\(\) that re-sorts tree with new compare function · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/4ab9678b9553d77bc0683ee69a8936524f6a7808)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 4ab9678b9553d77bc0683ee69a8936524f6a7808

Requested commit: 4ab9678b9553d77bc0683ee69a8936524f6a7808

Commit: 4ab9678b9553d77bc0683ee69a8936524f6a7808

Tree: a85c01160e6ae980c77b6e6a54645679cf21a1e1

Author: Shawn Landden

Committer: Shawn Landden

## Message

```
rb: add sort() that re-sorts tree with new compare function

You can also specify the same compare function, but after updating the
context that the function will use (connected to the rb.Tree) before.

```

## Parents

- [e19008292222d37b3a08a4e6a9d41553ecfcfd7e](https://git.cafe/gitcafe/zig/commit/e19008292222d37b3a08a4e6a9d41553ecfcfd7e?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/4ab9678b9553d77bc0683ee69a8936524f6a7808?format=markdown)
