Haskell function - 31
------------

    import List
    f=(.sort).(==).sort

Haskell program - <strike>81</strike> <strike>58</strike> 55
--------------------

    import List
    g=sort`fmap`getLine
    main=(`fmap`g).(==)=<<g

Kudos to [lambdabot][1] and its [pointfree refactoring][2].


  [1]: http://www.haskell.org/haskellwiki/Lambdabot
  [2]: http://www.haskell.org/haskellwiki/Pointfree