summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-02-02 01:04:34 -0800
committerKaz Kylheku <kaz@kylheku.com>2014-02-02 01:04:34 -0800
commit7ff372554e299753eace449f2e634de97ac38f7f (patch)
tree7b21c2fcee6b77e7009995f1598cf5e797b3736d
parent95f3ff4d015854a19ee62c2853a8b84e3aa4a124 (diff)
downloadtxr-7ff372554e299753eace449f2e634de97ac38f7f.tar.gz
txr-7ff372554e299753eace449f2e634de97ac38f7f.tar.bz2
txr-7ff372554e299753eace449f2e634de97ac38f7f.zip
* eval.c (eval_init): Register vector_list function a second time
under the name vec, as a variadic function. * txr.1: Document vec.
-rw-r--r--ChangeLog7
-rw-r--r--eval.c1
-rw-r--r--txr.112
3 files changed, 20 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 9f2e55bb..a088c057 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2014-02-02 Kaz Kylheku <kaz@kylheku.com>
+
+ * eval.c (eval_init): Register vector_list function a second time
+ under the name vec, as a variadic function.
+
+ * txr.1: Document vec.
+
2014-02-01 Kaz Kylheku <kaz@kylheku.com>
* hash.c (hash_mark, hash_grow, make_similar_hash,
diff --git a/eval.c b/eval.c
index 3d4ebbfd..5d4b4bcc 100644
--- a/eval.c
+++ b/eval.c
@@ -2667,6 +2667,7 @@ void eval_init(void)
reg_fun(intern(lit("length-str-<="), user_package), func_n2(length_str_le));
reg_fun(intern(lit("vector"), user_package), func_n1(vector));
+ reg_fun(intern(lit("vec"), user_package), func_n0v(vector_list));
reg_fun(intern(lit("vectorp"), user_package), func_n1(vectorp));
reg_fun(intern(lit("vec-set-length"), user_package), func_n2(vec_set_length));
reg_fun(vecref_s, func_n2(vecref));
diff --git a/txr.1 b/txr.1
index 57f0653d..9a73e0a7 100644
--- a/txr.1
+++ b/txr.1
@@ -8609,6 +8609,18 @@ Description:
The vector function creates and returns a vector object of the specified
length. The elements of the vector are initialized to nil.
+.SS Function vec
+
+.TP
+Syntax:
+
+ (vec . <args>)
+
+.TP
+Description:
+
+The vec function creates a vector out of its arguments.
+
.SS Function vectorp
.TP