Remove duplicate elements from list in Tcl

tcl

Solution

The following works for me

set myList [list this that when what when how]
lsort -unique $myList

this returns

how that this what when

which you could store in a new list

set uniqueList [lsort -unique $myList]

Problem

How to remove duplicate element from Tcl list say: ``` list is like [this,that,when,what,when,how] ``` I have Googled and have found `lsort unique` but same is not working for me. I want to remove when from list.

Original source