On Sat, Dec 12, 2009 at 5:34 AM, Brandon S. Allbery KF8NH
allb...@ece.cmu.edu 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
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 pk...@dcs.gla.ac.uk wrote:
Hi all,
I was looking for an APL-style “iota” function for array indices. I noticed
“range” from Data.Ix which
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 nro...@web.de wrote:
hi there
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 shinnon...@gmail.com wrote:
If you're absolutely certain that the lookup always succeeds, then you
can use pattern matching
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 (Node x
On 6/20/09, Andrew Coppin andrewcop...@btinternet.com 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. ;-)
On Tue, Jun 30, 2009 at 6:45 PM, Bryan O'Sullivanb...@serpentine.com 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
On 7/9/09, Heinrich Apfelmus apfel...@quantentunnel.de 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
On 7/12/09, Heinrich Apfelmus apfel...@quantentunnel.de wrote:
Raynor Vliegendhart wrote:
On 7/9/09, Heinrich Apfelmus apfel...@quantentunnel.de wrote:
Of course, some part of algorithm has to be recursive, but this can be
outsourced to a general recursion scheme, like the hylomorphism
On 8/6/09, Don Stewart d...@galois.com 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 a - s -
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, hask...@kudling.de wrote:
Hi,
Imagine you have a list with n-values. You are asked to iterate over the list
On Tue, Sep 22, 2009 at 10:01 AM, Jimmy Hartzell j...@shareyourgifts.net
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 (
12 matches
Mail list logo