concat!(x : %, y : %) ==
Qnull x =>
Qnull y => x
Qpush(first y, x)
QRPLACD(x, rest y)$Lisp
x
z := x
while not Qnull Qrest z repeat
z := Qrest z
QRPLACD(z, y)$Lisp
x
First, if x is null, then Qpush and QRPLACD on x will have no effect.
(3) -> x:=[]::List PI; concat!(x,[1]); x
(3) []
Second, the while loop is just 'tail'.
Finally, the whole function can just be replaced by
NCONC(x,y)$Lisp
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.