diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2012-02-22 00:42:06 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2012-02-22 00:42:06 -0800 |
commit | 2868a7009f04a40d52c27503a0a4feb50da5c877 (patch) | |
tree | 44e31e8cb33e6c1f1cd4bd6c7f6e77c3bc6521ac /lib.h | |
parent | 7338a92f135d2a5cb8db59c08885b63ee4991d9f (diff) | |
download | txr-2868a7009f04a40d52c27503a0a4feb50da5c877.tar.gz txr-2868a7009f04a40d52c27503a0a4feb50da5c877.tar.bz2 txr-2868a7009f04a40d52c27503a0a4feb50da5c877.zip |
* eval.c (eval_init): Intrinsic bindings for sub, ref, refset
and replace.
* lib.c (do_sort): Static function renamed to sort_list.
(swap, quicksort, sort_vec): New static functions.
(sort): Made generic over lists, vectors and strings.
(refset): New function.
* lib.h (sort): Declaration updated (parameter name change).
(refset): Declared.
* txr.1: Mention refset.
* txr.vim: Updated with refset.
Diffstat (limited to 'lib.h')
-rw-r--r-- | lib.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -560,12 +560,13 @@ val mapcar(val fun, val list); val mapcon(val fun, val list); val mappend(val fun, val list); val merge(val list1, val list2, val lessfun, val keyfun); -val sort(val list, val lessfun, val keyfun); +val sort(val seq, val lessfun, val keyfun); val find(val list, val key, val testfun, val keyfun); val set_diff(val list1, val list2, val testfun, val keyfun); val length(val seq); val sub(val seq, val from, val to); val ref(val seq, val ind); +val refset(val seq, val ind, val newval); val replace(val seq, val items, val from, val to); val env(void); val obj_print(val obj, val stream); |