Dan Piponi wrote:
If you allow me to play Devil's advocate for a moment...just don't let
this guy ask you how long the Haskell version takes.
In fact, you can borrow a trick from the C++ version. Try this instead:
import Data.Set
main = interact $ unlines . toList . fromList . words
Yes - I
On 5/18/07, Dan Weston <[EMAIL PROTECTED]> wrote:
How does the type of fromList get determined? And is Data.Set.toList the
same as Data.Set.toAscList?
As I import just Data.Set there is only one fromList in scope. It has
type (Ord a) => [a] -> Set a so there is no ambiguity.
I should have used
How does the type of fromList get determined? And is Data.Set.toList the
same as Data.Set.toAscList?
Dan Piponi wrote:
If you allow me to play Devil's advocate for a moment...just don't let
this guy ask you how long the Haskell version takes.
In fact, you can borrow a trick from the C++ versio
If you allow me to play Devil's advocate for a moment...just don't let
this guy ask you how long the Haskell version takes.
In fact, you can borrow a trick from the C++ version. Try this instead:
import Data.Set
main = interact $ unlines . toList . fromList . words
Assuming Data.Set is implem
OK, so I was hanging out on this newsgroup I often lurk. And we're
having a discussion. And I'm all like "Haskell is the greatest!" And
they're all like "nah, Haskell sux". And this one dude goes "hey, look
at this C++ code. How do you do that in Haskell?" And three other people
look at this C+