Re: [Haskell-cafe] Access to list

2008-01-13 Thread Tom Phoenix
On Jan 13, 2008 7:55 AM, Fernando Rodriguez <[EMAIL PROTECTED]> wrote: > If I define the follwoing functions: > > car (x:_) = x > car [] = [] What's the type signature for that function? Cheers! --Tom Phoenix ___ Haskell-Ca

Re: [Haskell-cafe] Haskell-cafe reply-to etiquette

2007-12-27 Thread Tom Phoenix
seemed counter > to other mailing lists I had been subscribed to, but I didn't think > too much about it. http://www.unicom.com/pw/reply-to-harmful.html Cheers! --Tom Phoenix ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.

Re: [Haskell-cafe] instance Monad Either?

2007-12-20 Thread Tom Phoenix
on? Near the bottom of that page is a comment by Luis Cabellos. Does that comment bring you any closer to enlightenment? Cheers! --Tom Phoenix ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Perl-style numeric type

2007-06-19 Thread Tom Phoenix
orward yet tedious to implement), I thought I would throw the idea out there and see if anyone knows of anything similar that has already been done before Do you know about Pugs? http://www.pugscode.org/ Hope this helps! --Tom Phoenix ___ Haskell

Re: [Haskell-cafe] Post mesg

2006-11-01 Thread Tom Phoenix
On 11/1/06, Farida Mishra <[EMAIL PROTECTED]> wrote: i would like to post mesg this list Your wish has been granted. Cheers! --Tom Phoenix ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/h

Re: [Haskell-cafe] function result caching

2006-10-12 Thread Tom Phoenix
d more about this, and the optimizations the compiler does, because I've searched the web before and i found very little on this topic. You need to search for the word "memoize" (or "memoise"). Here's a page about a memo function for GHC. http://www.haskell.org/ghc/docs/6.4.

Re: [Haskell-cafe] Haskell Program

2006-09-23 Thread Tom Phoenix
ad the source and figure it out? --Tom Phoenix ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: Re: [Haskell-cafe] Slow IO

2006-09-11 Thread Tom Phoenix
eeds to be. http://www.spoj.pl/ranks/WORDS1/ Of course, you don't have access to these other programs for comparison; but I hope that this gives you a better idea of the size (and manageability) of the task. Good luck with it! --Tom Phoenix _

Re: [Haskell-cafe] nondet function

2006-09-09 Thread Tom Phoenix
On 9/9/06, Ashley Yakeley <[EMAIL PROTECTED]> wrote: Is it possible to write nondet? Yes; it (or something very similar) is discussed here: http://www.haskell.org/haskellwiki/Timing_out_computations Hope this helps! --Tom Phoenix ___ H

Re: [Haskell-cafe] How to round off frational number?

2006-09-08 Thread Tom Phoenix
probably want showFFloat, from the Numeric module. There's also the Text.Printf module. Or you could write your own display code; but it's tricky to get it right for every possible case. http://haskell.org/ghc/docs/latest/html/libraries/base/Numeric.html#v%3AshowFFloat Hope th

Re: [Haskell-cafe] Monad laws

2006-09-07 Thread Tom Phoenix
produces a different function than the programmer wrote. Even though compilers aren't required to be "aware" of the monad laws, other programmers are. So, even if your compiler doesn't do any re-writing, another programmer who works on your code may essentially do the same thing.

Re: [Haskell-cafe] ReadP question

2006-08-30 Thread Tom Phoenix
his problem, your implementation of 'star' could perhaps be changed to answer "no more matches" rather than "infinitely many matches" once the body fails to consume any characters. Hope this helps! --Tom Phoenix ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe