aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Martin <github@martintribe.org>2014-04-15 20:54:18 -0500
committerJoel Martin <github@martintribe.org>2014-04-15 20:54:18 -0500
commit68c008cf5237e955cfc63785e92508f6f4e71f49 (patch)
treef96a2af1ce59c2ab1d9e3981c928fa99ca6cf24f
parent7e9a2883fe5c25a521b1dc37e4c549e1ed508ece (diff)
downloadmal-68c008cf5237e955cfc63785e92508f6f4e71f49.tar.gz
mal-68c008cf5237e955cfc63785e92508f6f4e71f49.zip
PS: fix concat with no args and conj.
-rw-r--r--docs/TODO1
-rw-r--r--ps/core.ps4
2 files changed, 2 insertions, 3 deletions
diff --git a/docs/TODO b/docs/TODO
index 05c0820..76ae3cf 100644
--- a/docs/TODO
+++ b/docs/TODO
@@ -46,7 +46,6 @@ PHP:
Postscript:
- negative numbers
- - self-hosting issues in steps 8,A
Python:
diff --git a/ps/core.ps b/ps/core.ps
index bdb3408..34e846e 100644
--- a/ps/core.ps
+++ b/ps/core.ps
@@ -92,7 +92,7 @@ end } def
% [listA listB] -> concat -> [listA... listB...]
/concat { % replaces matric concat
dup _count 0 eq { %if just concat
- 0 _list
+ pop 0 _list
}{ dup _count 1 eq { %elseif concat of single item
0 _nth % noop
}{ % else
@@ -129,7 +129,7 @@ end } def
} for
new_arr _list_from_array
}{ %else vector
- src_arr new_arr copy
+ src_arr new_arr copy pop
1 1 args _count 1 sub {
/idx exch def
new_arr src_arr length idx add 1 sub args idx _nth put