Steve Schafer wrote:
I have a list of text strings:
[Alice, Bob, Cindy, Bob, Bob, Dave, Cindy]
As you can see, some of the strings occur only once; others appear two
or more times.
I would like to end up with a new list, according to the following
rules:
1) If a string occurs only
Hello Slavomir,
Thursday, November 2, 2006, 5:51:17 PM, you wrote:
I wouldn't like to manually define instances of Visible for all types
that have Show instances.
believe it or not but i had the same problems
I think I need something like that:
class Visible a where
instance Show a =
On Thu, 2 Nov 2006, Sebastian Sylvan wrote:
On 11/2/06, Maurício [EMAIL PROTECTED] wrote:
Hi,
Is there a function to get that? I'm using
\x - x - fromIntegral(floor x)
since I was not able to find something better, but I guess I have missed
something in the standard
Hello Slavomir,
Thursday, November 2, 2006, 9:59:38 PM, you wrote:
one is okay, though, but you have to start ghc with
-fallow-undecidable-instances and -fglasgow-exts I'm afraid.
Thanks, Sebastian. That was helpful. Are there any papers on the subject?
i recommend you to read in the
Hello Slavomir,
Thursday, November 2, 2006, 5:47:37 PM, you wrote:
class Show a = Visible a where
toString :: a - String
toString = show
size :: a - Int
size = length . show
it's not that you need. it's definition of subclass, say
class Set a = OrderedSet a
--
Best
Hello alaiyeshi,
Thursday, November 2, 2006, 9:26:37 PM, you wrote:
I've met replicateM_ for the first time;-) This could be a
template for doing online-judge exercises I guess. And it's very useful for
newbies like me.
make an date for 'interact' :)))
--
Best regards,
Bulat
Hello Donald,
Thursday, November 2, 2006, 2:21:31 PM, you wrote:
10-20 times difference is typical for GHC programs.
It's really more like 2-4x. Sometimes better than C.
Where's this huge figure coming from Bulat? If you have code that
behaves like this, you should report it.
are you
On 11/3/06, Bulat Ziganshin [EMAIL PROTECTED] wrote:
Hello Slavomir,
Thursday, November 2, 2006, 9:59:38 PM, you wrote:
one is okay, though, but you have to start ghc with
-fallow-undecidable-instances and -fglasgow-exts I'm afraid.
Thanks, Sebastian. That was helpful. Are there any papers
Henning Thielemann wrote:
On Thu, 2 Nov 2006, Sebastian Sylvan wrote:
On 11/2/06, Maurício [EMAIL PROTECTED] wrote:
Hi,
Is there a function to get that? I'm using
\x - x - fromIntegral(floor x)
since I was not able to find something better, but I guess I have missed
something in the
Wow! Thank you for your suggestion.
But I guess in this problem the first input line and the other are different in
their meaning. Thus if I use interact I should parse the input(again), I
guess.___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Chad Scherrer [EMAIL PROTECTED] wrote:
afaik, seq cost is zero (except for evaluating expressions, of
course)
So if x has already been evaluated, does x `seq` y evaluate just as
quickly as y alone, or does it require extra cycles to make sure x has
been evaluated?
My understanding is
Hello alaiyeshi,
Friday, November 3, 2006, 4:23:40 PM, you wrote:
But I guess in this problem the first input line and the other are
different in their meaning. Thus if I use interact I should parse the
input(again), I guess.
it seems that you don't understand that functional programming
12 matches
Mail list logo