Re: [Haskell-cafe] Project Euler: request for comments

2011-08-31 Thread Oscar Picasso
nt -> Int -> [Int] -> Int > f011helper t u v (w:ws) >    | ws == []  = t*u*v*w >    | otherwise = max (t*u*v*w) (f011helper u v w ws) > > > -- Note: f011helper does not call f011. > > > On Mon, Aug 29, 2011 at 9:40 AM, Oscar Picasso wrote: >> Got it. >

Re: [Haskell-cafe] Project Euler: request for comments

2011-08-31 Thread Oscar Picasso
axprods4 xs = maximum $ prods xs > > On Mon, Aug 29, 2011 at 9:40 AM, Oscar Picasso wrote: >> Got it. >> >> f :: [Int] -> Int >> f (t:u:v:xs) = helper t u v xs >> >> helper :: Int -> Int -> Int -> [Int] -> Int >> helper t u v (w:ws) >&g

Re: [Haskell-cafe] Project Euler: request for comments

2011-08-27 Thread Oscar Picasso
011, 16:03:46, Oscar Picasso wrote: >> Daniel, >> >> There are included as gists on the link provided. After your remark, I >> looked at the generated html code in my blog. The gists are actually >> displayed by running a javascript. >> Maybe your brows

Re: [Haskell-cafe] Project Euler: request for comments

2011-08-27 Thread Oscar Picasso
b.com/1163872 pb 09: https://gist.github.com/1166852 pb 010: https://gist.github.com/1172509 pb 011: https://gist.github.com/1172521 On Sat, Aug 27, 2011 at 4:47 AM, Daniel Fischer wrote: > On Saturday 27 August 2011, 02:34:24, Oscar Picasso wrote: >> Hi, >> >> I order to improve m

[Haskell-cafe] Project Euler: request for comments

2011-08-26 Thread Oscar Picasso
/tag/projecteuler Oscar Picasso ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Haskell syntax highlighting in a public blog

2011-08-09 Thread Oscar Picasso
Thanks for your input. As stated by Ivan I was looking for a solution to use in a public blog like wordpress.com. I chose Chris Yuen solution with a minor revision because I use Posterous. Posterous does not use the embed script but it accepts Gists links. See: http://blog.posterous.com/posterous

[Haskell-cafe] Haskell syntax highlighting in a public blog

2011-08-08 Thread Oscar Picasso
Hi, Is there a public blog that that allow syntax highlighting of Haskell code? Oscar Picasso ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Re: Type classes

2008-12-26 Thread Oscar Picasso
Forget it. It's more clear reading further. Sorry for the noise. On Sat, Dec 27, 2008 at 1:02 AM, Oscar Picasso wrote: > From Real World Haskell: > > data JValue = JString String > | JNumber Double > | JBool Bool > | JNull >

[Haskell-cafe] Type classes

2008-12-26 Thread Oscar Picasso
>From Real World Haskell: data JValue = JString String | JNumber Double | JBool Bool | JNull | JObject [(String, JValue)] | JArray [JValue] deriving (Eq, Ord, Show) type JSONError = String class JSON a where toJVa

[Haskell-cafe] Function composition

2008-12-26 Thread Oscar Picasso
Hi, I can write: *Main> let yes = not . not *Main> :t yes yes :: Bool -> Bool But not: *Main> let isNotEqual = not . (==) :1:23: Couldn't match expected type `Bool' against inferred type `a -> Bool' Probable cause: `==' is applied to too few arguments In the second argumen