[Haskell-cafe] testing for same characters in lists of strings

Jackm139 jackmarathon at gmail.com
Mon Apr 7 22:51:05 EDT 2008

I'm new to Haskell, and I'm finding it is very different from any other
language I have worked with.

I have an assignment to make a program to test whether two lists use the
same characters for each string.

sameCharacter ["rock", "cab"] ["cork", "abc"]

My plan to tackle this was to use:
nub to eliminate duplications,
sort to put the characters in order,
and map to put characters together.. and then somehow check to see if these
characters are the same.

My problem right now is just figuring out how to make a function that uses
these three functions to give me a list of tuples.

I know this is an awfully newbish question, and I'm not trying to get an
answer to my homework problem.
I just need some sort of working example syntax to off of.

Any help would be appreciated!

View this message in context: http://www.nabble.com/testing-for-same-characters-in-lists-of-strings-tp16546167p16546167.html
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

More information about the Haskell-Cafe mailing list