diff options
| author | Drahflow <drahflow@gmx.de> | 2015-03-01 02:12:16 +0100 |
|---|---|---|
| committer | Drahflow <drahflow@gmx.de> | 2015-03-01 02:12:16 +0100 |
| commit | d875ed6ccadd68ff9690533684ee1c91ad977a9d (patch) | |
| tree | bc3c3441543fba0ce974a3ed1968924f40ea2403 | |
| parent | b3fdecf124c6c3b7345db6df1a44272eed2e13c7 (diff) | |
Trees now work.
| -rw-r--r-- | doc/container.md | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/doc/container.md b/doc/container.md index eb5961d..1910832 100644 --- a/doc/container.md +++ b/doc/container.md @@ -104,7 +104,36 @@ done via `has`. Trees ----- -Trees provide mapping from integers (FIXME: will allow strings soon) to arbitrary objects, -keeping the keys in `le` ascending order. Otherwise they should work just as maps. +Trees provide mapping from keys to arbitrary objects, +keeping the keys in `lt`/`eq`/`gt` ascending order. Otherwise they should work just as maps. -FIXME: Example will be provided once string-keys are supported. + tree ==t + 1 /foo t =[] + 2 /bar t =[] + t dump + <scope: 0000600000533210> + t dom dump + [ + "bar" + "foo" + ] + t |dump each + 0000000000000002 + 0000000000000001 + /foo t * dump + 0000000000000001 + /foo t .has dump + 0000000000000001 + /FOO t .has dump + 0000000000000000 + t 2 mul ==t2 + t2 dom dump + [ + "bar" + "foo" + ] + t2 |dump each + 0000000000000004 + 0000000000000002 + /foo t2 * dump + 0000000000000002 |
