Good evening everyone and Merry Christmas,
One question: is there a command, in HP PRIME, to delete repeated values or groups in a list?
For instance: {1,1,2,3,4,4,5} --command--> {1,2,3,4,5}
or: {{1,2},{3,4},{1,2},{5,6},{3,4}} --command--> {{1,2},{3,4},{5,6}}
Thanks for the help, Roberto.
(12-24-2021 04:53 PM)robmio Wrote: [ -> ]One question: is there a command, in HP PRIME, to delete repeated values or groups in a list?
For instance: {1,1,2,3,4,4,5} --command--> {1,2,3,4,5}
or: {{1,2},{3,4},{1,2},{5,6},{3,4}} --command--> {{1,2},{3,4},{5,6}}
UNION works for your first example- it removes duplicates if given a single list as an argument. I'm not sure about your second argument, UNION should work but I don't have my Prime handy.
(12-24-2021 04:57 PM)John Keith Wrote: [ -> ] (12-24-2021 04:53 PM)robmio Wrote: [ -> ]One question: is there a command, in HP PRIME, to delete repeated values or groups in a list?
For instance: {1,1,2,3,4,4,5} --command--> {1,2,3,4,5}
or: {{1,2},{3,4},{1,2},{5,6},{3,4}} --command--> {{1,2},{3,4},{5,6}}
UNION works for your first example- it removes duplicates if given a single list as an argument. I'm not sure about your second argument, UNION should work but I don't have my Prime handy.
It works! It works with both the first and the second example!
Thanks for the suggestion, Roberto