import Data.List(nub,sort,subsequences) g=nub.filter((10==).sum).subsequences.sort main = print $ g [5,2,3,5]
Standard input is empty
[[2,3,5],[5,5]]
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!