On Fri, Feb 21, 2003 at 06:33:10PM +0100, Stefan Karrmann wrote:
> Mike T. Machenry (Wed, Feb 19, 2003 at 10:23:45PM -0500):
> > Question 1: Is there an easier, more elegant way to write this code?
> >
> > output a b c d e = println "Hello, this is " ++ show a ++ " a really hard "
> > "to write
Mike T. Machenry (Wed, Feb 19, 2003 at 10:23:45PM -0500):
> Question 1: Is there an easier, more elegant way to write this code?
>
> output a b c d e = println "Hello, this is " ++ show a ++ " a really hard "
> "to write function that " ++ show b ++ " would be easier to write with "
> "a print
On Fri, Feb 21, 2003 at 12:14:04AM -0500, Mike T. Machenry wrote:
> Hmm, that does seem like alot of code to say such a little thing. Is it
> possible to come at the problem from the other direction? By this I mean I
> am trying to have two sets of symbols be enumerated together. This solution
> I
Hmm, that does seem like alot of code to say such a little thing. Is it
possible to come at the problem from the other direction? By this I mean I
am trying to have two sets of symbols be enumerated together. This solution
I asked for tries to impose the enumeration over the data. Can I define
dat
Oops! Small bug. See below.
Dean Herington wrote:
> You can't derive Enum Player automatically, but you can program it. Here's one
> way how, using shorter example names.
>
> -- Dean
>
> data E1 = E1a | E1b | E1c deriving (Enum, Bounded, Show, Read)
> data E2 = E2a | E2b | E2c deriving (Enum,
You can't derive Enum Player automatically, but you can program it. Here's one
way how, using shorter example names.
-- Dean
data E1 = E1a | E1b | E1c deriving (Enum, Bounded, Show, Read)
data E2 = E2a | E2b | E2c deriving (Enum, Bounded, Show, Read)
data E = E1 E1 | E2 E2deriving (Show, R
succ Blue cannot return MrX unless Blue and MrX have the same type. What
I meant was that you would say:
'succ (Detective Red)' ==> Detective Green
'succ (Detective Green)' ==> Detective Blue
'succ (Detective Blue)' ==> Fugitive MrX
--
Hal Daume III
"Computer science is no more about
I tried this. It doesn't work. succ Blue is an exception. Anybody else know
how this should be done?
Thanks,
-mike
On Thu, Feb 20, 2003 at 08:00:04AM -0800, Hal Daume III wrote:
> > Question 1: Is there an easier, more elegant way to write this code?
>
> For the most part, no.
>
> > Question 2:
> Question 1: Is there an easier, more elegant way to write this code?
For the most part, no.
> Question 2: Is there a way to express the following relationship?
> I want to have a set of symbols with ordering and another set that is
> part of that ordering but with a different parent. For examm
Question 1: Is there an easier, more elegant way to write this code?
output a b c d e = println "Hello, this is " ++ show a ++ " a really hard "
"to write function that " ++ show b ++ " would be easier to write with "
"a printf " ++ show c ++ show d ++ show e
Question 2: Is there a way to exp
10 matches
Mail list logo