On 11/30/06, Huazhi (Hank) Gong [EMAIL PROTECTED] wrote:
Thanks, it make sense here.
However, like I want to choose s[1,3,6,10] or something like this. Are there
some straightforward function or operator for doing this job? The !!
operator in haskell seems does not support multiple indecies.
Hac 2007
The 2007 Haskell Hackathon
January 10-12, 2007
Oxford University Computing Laboratory
http://haskell.org/haskellwiki/Hac_2007
The deadline
Hi,
I've got an object model that I have a difficult time conceptualising how it
might look like in Haskell:
class Element { }
class Inline : Element { }
class ParentInline : Inline {
ListInline children;
}
class Bold : ParentInline { }
class Underline : ParentInline { }
class Link :
Hi,
with the following code, I want to measure the time being needed to
execute the algorithm. But the result is always 0.0.
import Char (toLower)
import Maybe
import List ( delete, sort, intersect )
import System.CPUTime
import Control.Exception
import Debug.Trace
fromInt = fromIntegral
Have you looked at OOHaskell (http://homepages.cwi.nl/~ralf/OOHaskell/)?
-Jeff
[EMAIL PROTECTED] wrote on 12/07/2006 07:07:46 AM:
Hi,
I've got an object model that I have a difficult time
conceptualising how it might look like in Haskell:
class Element { }
class Inline : Element { }
On Thu, 7 Dec 2006, Lennart wrote:
Hi,
with the following code, I want to measure the time being needed to execute
the algorithm. But the result is always 0.0.
You need to do something to force the result of a, or it'll never actually
get evaluated. Depending on the type in question, seq
On 12/7/06, Lennart [EMAIL PROTECTED] wrote:
Hi,
with the following code, I want to measure the time being needed to
execute the algorithm. But the result is always 0.0.
import Char (toLower)
import Maybe
import List ( delete, sort, intersect )
import System.CPUTime
import Control.Exception
Hello Lennart,
Thursday, December 7, 2006, 4:59:57 PM, you wrote:
time $ product [1..1000] `seq` return ()
instead of
time $ doTest wordList2 wordList2 `seq` return ()
works fine.
because 'product' returns just one value. use the following:
time $ (return $! last (doTest wordList2
On 12/7/06, Lennart [EMAIL PROTECTED] wrote:
Hi,
with the following code, I want to measure the time being needed to
execute the algorithm. But the result is always 0.0.
import Char (toLower)
import Maybe
import List ( delete, sort, intersect )
import System.CPUTime
import Control.Exception
I've read Jeff Newbern's tutorial on monad transformers
(http://www.nomaware.com/monads/html/index.html), but I don't grok it
yet and I can't tell how to get started with this particular
requirement, or even if I need monad transformers for this.
I have a program that performs a series of IO
Cat Dancer wrote:
I have a program that performs a series of IO operations, each which
can result in an error or a value. If a step returns a value I
usually want to pass that value on to the next step, if I get an error
I want to do some error handling but usually want to skip the
remaining
And you just rediscovered monad transformers.
Can I use an existing monad transformer like ErrorT for this application?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On 12/7/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Cat Dancer wrote:
I have a program that performs a series of IO operations, each which
can result in an error or a value. If a step returns a value I
usually want to pass that value on to the next step, if I get an error
I want to do
On 12/7/06, Cat Dancer [EMAIL PROTECTED] wrote:
On 12/7/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
I'm sure from a single example I could understand what was going on
and elaborate from there.
Let's say I want to get a line from the user, and either return an
integer or an error string
newArray_ allocates an array full of garbage.
import Control.Monad.ST
import Data.Array.ST
import Data.Array
tickle :: Int
tickle = runST (do {
x - newArray_ (0,100) ;
(readArray :: STUArray s Int Int - Int - ST s Int) x 3
})
___
I'm looking to not reinvent the wheel.
Is there an existing package that supports interval arithmetic on
integers (or more)? A possible complication is that I'm hoping to
include open intervals such as (GreaterEqThan 3).
If there's not a package to go with, any pointers on the appopriate
rules
nicolas.frisby:
I'm looking to not reinvent the wheel.
Is there an existing package that supports interval arithmetic on
integers (or more)? A possible complication is that I'm hoping to
include open intervals such as (GreaterEqThan 3).
If there's not a package to go with, any pointers on
Some of that is in the Ranged Sets library:
http://ranged-sets.sourceforge.net/Ranged/
but it doesn't support Num.
On 12/8/06, Nicolas Frisby [EMAIL PROTECTED] wrote:
I'm looking to not reinvent the wheel.
Is there an existing package that supports interval arithmetic on
integers (or more)?
18 matches
Mail list logo