On Mon, Apr 07, 2008 at 03:11:16PM -0400, John Tromp wrote:
> An improved version is:
>
> inits l = [] : case l of [] -> []
>(x:xs) -> map (x:) inits xs
For information on how to propose this, please see
http://www.haskell.org/haskellwiki/Library_submissions
Th
You may be interested in also looking at the winning entry in the
design competition of the "5th ACM-IEEE Intl. Conf. on Formal Methods
and Models for Codesign (MEMOCODE'2007)"
http://www.ece.cmu.edu/~jhoe/distribution/mc07contest/
The design problem was a fast matrix multiplier using a combi
Hi Ki
Yung,
It depends a bit on what you want to use these lists for, but the
following encoding works for your examples and doesn't need the type
class.
data E
data O
type Even = (E,O)
type Odd = (O,E)
data List p a where
Nil :: List a Even
Cons :: a -> List a (p1,p2) -> List a (
Using GADTs and functional dependencies, we can define GADT lists
that statically distinguishes even length lists from odd length lists.
> data Even
> data Odd
>
> class Flip b c | b -> c, c -> b where
>
> instance Flip Even Odd where
> instance Flip Odd Even where
>
> data List a b where
> Nil
Hello Tillmann,
Wednesday, April 23, 2008, 8:01:50 PM, you wrote:
> I am currently experimenting with parallelizing C-programs. I have
> therefore written a matrix vector multiplication example that needs 13
> seconds to run (5 seconds with OpenMP). Because I like Haskell I did the
> same in this
ups, wrong newsgroup, sorry
___
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell
===
(DEADLINE EXTENSION)
WFLP 2008
17th International Workshop on Functional
and (Constraint) Logic Programming
Siena, Italy, July
Hi,
I am currently experimenting with parallelizing C-programs. I have
therefore written a matrix vector multiplication example that needs 13
seconds to run (5 seconds with OpenMP). Because I like Haskell I did the
same in this language, but it takes about 134 seconds. Why is it so
slow? Does
Hi
I am pleased to announce the TagSoup 0.6 library, available from Hackage:
* http://hackage.haskell.org/cgi-bin/hackage-scripts/package/tagsoup
"TagSoup is a library for extracting information out of unstructured
HTML code, sometimes known as tag-soup. The HTML does not have to be
well formed,