From 9528bb145193159fa3e697da642e32a0877af5fb Mon Sep 17 00:00:00 2001 From: Joel Martin Date: Tue, 1 Apr 2014 22:50:55 -0500 Subject: All: pass stepA tests, in particular with correct conj behavior. --- python/mal_types.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'python/mal_types.py') diff --git a/python/mal_types.py b/python/mal_types.py index fa0a11e..401a03b 100644 --- a/python/mal_types.py +++ b/python/mal_types.py @@ -200,7 +200,10 @@ def concat(*lsts): return List(chain(*lsts)) # retains metadata def conj(lst, *args): - new_lst = List(lst + list(args)) + if list_Q(lst): + new_lst = List(list(reversed(list(args))) + lst) + else: + new_lst = Vector(lst + list(args)) if hasattr(lst, "__meta__"): new_lst.__meta__ = lst.__meta__ return new_lst -- cgit v1.2.3