On Sat, Dec 12, 2009 at 5:34 AM, Brandon S. Allbery KF8NH
wrote:
>
> > On Dec 11, 2009, at 23:30 , michael rice wrote:
> >
> > I'm just noticing that "--" comments don't seem to work properly when the
> > first character following them is a '*'.
>
> I believe the spec only treats "-- " as a comme
On Tue, Sep 22, 2009 at 10:01 AM, Jimmy Hartzell
wrote:
> I am in love with this proposal:
> http://www.haskell.org/haskellwiki/Accessible_layout_proposal
I'm not sure whether I like the idea in general or not. It looks a bit
odd. The suggestion on the talk page (
http://www.haskell.org/haskellw
Just wondering, what should be the expected output be of something
like mavg 4 [1..3]? [3%2] or []?
Patai's and Eugene's solutions assume the former.
On Thu, Aug 27, 2009 at 10:19 AM, wrote:
> Hi,
>
> Imagine you have a list with n-values. You are asked to iterate over the list
> and calculate t
On 8/6/09, Don Stewart wrote:
> leaveye.guo:
> > Hi haskellers:
> >
> > There is a mistake in http://www.haskell.org/haskellwiki/State_Monad
> >
> > It post two functions like this :
> >
> > evalState :: State s a -> s -> a
> > evalState act = fst $ runState act
> >
> > execState :: State s
On 7/12/09, Heinrich Apfelmus wrote:
> Raynor Vliegendhart wrote:
> > On 7/9/09, Heinrich Apfelmus wrote:
> >> Of course, some part of algorithm has to be recursive, but this can be
> >> outsourced to a general recursion scheme, like the hylomorphism
> >>
&g
On 7/9/09, Heinrich Apfelmus wrote:
>
> Of course, some part of algorithm has to be recursive, but this can be
> outsourced to a general recursion scheme, like the hylomorphism
>
>hylo :: Functor f => (a -> f a) -> (f b -> b) -> (a -> b)
>hylo f g = g . fmap (hylo f g) . f
>
Is that defin
On Tue, Jun 30, 2009 at 6:45 PM, Bryan O'Sullivan wrote:
> I've thought for a while that it would be very nice indeed if the Monoid
> class had a more concise operator for infix appending than "a `mappend` b".
> I wonder if other people are of a similar opinion, and if so, whether this
> is worth s
On 6/20/09, Andrew Coppin wrote:
>
> Is this a known bug in GHC 6.10.1? Will upgrading fix it? (Obviously, it's
> quite a lot of work to change GHC.) Suffice it to say that my program is
> quite big and complicated; it worked fine when it was still small and
> simple. ;-)
There is a bug in ghci 6
This might be slightly related. When I was assisting a Haskell lab
course, I encountered solutions like the following:
> removeRoot :: BSTree a -> BSTree a
> removeRoot (Node x Empty Empty) = Empty
> removeRoot (Node x left Empty) = left
> removeRoot (Node x Empty right) = right
> removeRoot (Nod
I just noticed that my suggestion doesn't work. You're testing whether
val is Nothing and in my code snipped val has a different type.
On 6/3/09, Raynor Vliegendhart wrote:
> If you're absolutely certain that the lookup always succeeds, then you
> can use patter
If you're absolutely certain that the lookup always succeeds, then you
can use pattern matching as follows:
where
jr = joinTuples sc x val
key = getPartialTuple is x
Just val = Map.lookup key m
On 6/3/09, Nico Rolle wrote:
> hi there
>
> heres a code s
this, you can reduce your iota function to a powerful one-liner:
iota = sequence . map (enumFromTo 0 . pred)
Kind regards,
Raynor Vliegendhart
On 6/1/09, Paul Keir wrote:
>
>
>
> Hi all,
>
>
>
> I was looking for an APL-style “iota” function for array indices. I noticed
12 matches
Mail list logo