List of terms



hello to all, I must resolve this problem:

given one list of terms of this type

[f(a,b),f(c,d), f(a,g), f(c,h) ]

I must have like result this list

[f(a,b),f(c,d) ]

that is I must eliminate the terms that they have like first argument,
the same first argument of a already present term. how I can make?
thanks.

.