Le sam. 23 déc. 2023 à 21:53, 'Nasser M. Abbasi' via FriCAS - computer
algebra system <fricas-devel@googlegroups.com> a écrit :
>
> 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"]

Here concat(L1,L2)@List(Any)

> op() also work on any expression,
>
> op(sin(x)+cos(x)+exp(y))
> gives
>                         sin(x), cos(x), exp(y)

Here I would do:
kernels(sin(x)+cos(x)-exp(y))
=>
                          y
   (4)  [sin(x), %e , cos(x)]
                                      Type: List(Kernel(Expression(Integer)))


I stop here, I am not at all an Expression specialist, sorry.

But I'm pretty sure there is no such operator unless you "destruct"
your expression, in InputForm or something like that, that is to a near Lisp
level.

Regards,

- Greg


> 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)  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 fricas-devel+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/fricas-devel/2ee3f825-3af7-4fba-bba5-91ae7afa40f2n%40googlegroups.com.

-- 
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 fricas-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/CAHnU2dYbGmQ4n%2B5%3D2mqCA7bmJJ9UoXiYwsH0_2sMOG1WekLaRA%40mail.gmail.com.

Reply via email to