[I've switched my response to the Haskell-cafe list]
What do you intend if both (get a) and (get b) return Nothing?
You might also be interested in the library function 'maybe':
http://www.haskell.org/onlinereport/standard-prelude.html#$vmaybe
or maybe (sic) Maybe.fromMaybe in:
The recent post of Graham Klyne (below) reminds me that I have meant to ask:
is there a ``top 20'' things a serious programmer should know when writing
code in Haskell? Of course there is a lot of programming language theory
that would be great to know, but I mean really down-to-earth things like
On Mon, 07 Feb 2005 15:08:56 +, Graham Klyne wrote:
[I've switched my response to the Haskell-cafe list]
I'm following all lists through gmane, hoping the post will work.
I've received a double-ack first from gmane and then from the
mailing-list manager.
What do you intend if both (get a)
Hello
This might be a trivial question, but I wonder if anybody knows how to
write a function
proj :: (Functor f, Functor f') =
(f:*:f') (a,b) - f a
where
data a:*:b o = Pair (a o) (b o)
I think I really want to project out a component of F (AxB) x F' (AxB).
However, this seems harder
Is there documentation somewhere about how to name
third party libraries?
For example, if I have HTTP and SMTP libraries,
what should I call them?
-alex-
__
S. Alexander Jacobson tel:917-770-6565 http://alexjacobson.com
hello
i'm new to haskell so i'm sorry if this is a stupid question, but i'm having
problems with some basic code.
the code :
data Maybe Dir = Just Dir | Nothing
data Dir = Left | Right | Up | Down
data Piece = Vertical | Horizontal | CodeA | CodeB
flow = [(Horizontal, Left, Left),
Delete
data Maybe Dir = Just Dir | Nothing
as it is unnecessary Maybe a is defined already for any type a
(and doesn't make sense, Dir occuring before the = sign would indicate
that it is a type variable, but it is uppercase), and also change
data Dir = Left | Right | Up | Down
data Piece =
On Mon, 7 Feb 2005 17:54:46 -0500 (Eastern Standard Time), S.
Alexander Jacobson [EMAIL PROTECTED] wrote:
Is there documentation somewhere about how to name
third party libraries?
For example, if I have HTTP and SMTP libraries,
what should I call them?
See
These classes seem like they might correspond to concepts in category
theory:
class Functor f where
fmap :: (a - b) - f a - f b
-- must satisfy:
-- fmap id = id
-- fmap (p . q) = (fmap p) . (fmap q)
class (Functor f) = C1 f where
f1 :: f (a - b) - f a - f