What I meant to say, the lists in Fricas have to be same type, else it will
not work with concat. Here is an example
20) -> L1:=[1,2,3]
(23) -> L2:=["D","E","F"]
(24) -> concat(L1,L2)
gives error.
But in Maple using op()
L1:=[1,2,3];
L2:=["E","F","G"];
L3:=[ op(L1) , op(L2) ];
L3 := [1, 2, 3, "E", "F", "G"]
op() also work on any expression,
op(sin(x)+cos(x)+exp(y))
gives
sin(x), cos(x), exp(y)
Does Fricas have op()? whe I did ?op it said no. How does one then extract
all the operands of expression in Fricas?
--Nasser
On Saturday, December 23, 2023 at 2:42:13 PM UTC-6 Nasser M. Abbasi wrote:
> Maple has very useful command op(expression)
> <https://www.maplesoft.com/support/help/maple/view.aspx?path=op> which
> basically extracts operands of the expression to an expression sequence.
> For example, gives two lists and if I want to join the two lists into one
> list, I could do
>
> L1:=["A","B","C"];
> L2:=["E","F","G"];
> L3:=[ op(L1) , op(L2) ];
>
> L3 := ["A", "B", "C", "E", "F", "G"]
> How would one do the same thing in Fricas? concat() does not work. Also
> concat only works on string while the above Maple code works on any type of
> list.
>
> Does Fricas have something similar to Maple's op?
>
> Thanks
> --Nasser
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/fricas-devel/2ee3f825-3af7-4fba-bba5-91ae7afa40f2n%40googlegroups.com.