diff options
-rw-r--r-- | eval.c | 4 | ||||
-rw-r--r-- | txr.1 | 8 |
2 files changed, 10 insertions, 2 deletions
@@ -5437,6 +5437,7 @@ void eval_init(void) val me_each_f = func_n2(me_each); val me_for_f = func_n2(me_for); val diff_f = func_n4o(set_diff, 2); + val length_f = func_n1(length); protect(&top_vb, &top_fb, &top_mb, &top_smb, &special, &builtin, &dyn_env, &op_table, &pm_table, &last_form_evaled, &last_form_expanded, @@ -6160,7 +6161,8 @@ void eval_init(void) reg_fun(intern(lit("uni"), user_package), func_n4o(uni, 2)); reg_fun(intern(lit("seqp"), user_package), func_n1(seqp)); - reg_fun(intern(lit("length"), user_package), func_n1(length)); + reg_fun(intern(lit("length"), user_package), length_f); + reg_fun(intern(lit("len"), user_package), length_f); reg_fun(intern(lit("empty"), user_package), func_n1(empty)); reg_fun(intern(lit("copy"), user_package), func_n1(copy)); reg_fun(intern(lit("sub"), user_package), func_n3o(sub, 1)); @@ -25391,9 +25391,10 @@ A sequence is defined as a list, vector or string. The object denotes the empty list and so is a sequence. -.coNP Function @ length +.coNP Functions @ length and @ len .synb .mets (length << object ) +.mets (len << object ) .syne .desc If @@ -25403,6 +25404,11 @@ is a sequence, the function returns the number of items it contains. +The +.code len +function is a synonym of +.codn length . + The function supports these additional types: .RS .coIP hash |