"h." said:
> splitS :: String -> String -> [String]
> splitS a b = splitA a b
> where
> z = length b - 1
> splitA [] _ = [""]
> splitA (c:cs) (d:ds) | c == d && fst s == ds = "" : splitA (snd s) b
> | otherwise = (c : head r) : tail r
> wher
Hi
forgive my ignorance but I thought functional programming was a
mathematically sound framework unlike Object Oriented programming.
Referentially transparent is a better term than mathematically sound
here. This is the property that x = y means that instances of x can be
replaced with y.
C
On Wed, Feb 28, 2007 at 05:48:09PM -0500, Isaac Dupree wrote:
>
> Trying to implement literate haskell[*], I realized several
> ways in which the correct behavior for unliterating (especially with
> regard to errors) was unclear. I have several cases which ghc, hugs
> and Haskell 98 have differin
On Tue, Feb 27, 2007 at 05:36:29AM +0100, Dunric wrote:
>
> Graphics/UI/SDL/Rotozoomer.hs:15:7:
> Could not find module `Foreign.C':
> it is a member of package base, which is hidden
This is normally caused by forgetting to include
build-depends: base
in a .cabal file. When cabal
Hi
forgive my ignorance but I thought functional programming was a
mathematically sound framework unlike Object Oriented programming.
Referentially transparent is a better term than mathematically sound
here. This is the property that x = y means that instances of x can be
replaced with y.
I
Hi folks
forgive my ignorance but I thought functional programming was a
mathematically sound framework unlike Object Oriented programming.
Isn't using Haskell for OOP kind of defeating the whole object?
And the pun wasn't deliberate./ Honest!
Regards
Paul
__
On Thu, Mar 01, 2007 at 01:47:38PM -0600, John Goerzen wrote:
> Hello,
>
> I'm pleased to announce the first release of HSH.
>
> HSH is designed to let you mix and match shell expressions with Haskell
> programs. With HSH, it is possible to easily run shell commands, capture
> their output or pro
"Steve Downey" <[EMAIL PROTECTED]> wrote:
> I'm not sure, though, what would happen if I tried to
> add state to the types. With the previous example,
> using existentials to create a reference type that
> holds elements of a type class that matches the interface,
> I think that it would be natura
Hi,
I'd been using trex.hs for extensible records and programmed a bit using
it. I liked it for what it did and also because it had very nice
documentation on how to use it. I know there are other proposals and
implementations in Haskell for records (HaskellDB and HList), but for
the time b
Hello,
I'm pleased to announce the first release of HSH.
HSH is designed to let you mix and match shell expressions with Haskell
programs. With HSH, it is possible to easily run shell commands, capture
their output or provide their input, and pipe them to/from other shell
commands and arbitrary H
This link might be what you are after:
http://okmij.org/ftp/Haskell/typecast.html#deepest-functor
On 3/1/07, Walter Potter <[EMAIL PROTECTED]> wrote:
Folks,
Given f:: a -> b it is very natural to lift f to P f :: P a -> P b
where P is the power set functor. Or L f :: [a] -> [b].
We are modeli
David Roundy wrote:
It seems like GSLHaskell is an awfully big stick, when all you need are
scalar multiply and vector addition. Of course, we don't know what
functions he wants to minimize, but in the absence of any need for GSL
functions, I don't see a good reason for it.
The function is jus
It's not mine, but I just came across the following from a link in #haskell:
http://blogs.nubgames.com/code/?p=22
A brilliantly written, fantastically clear exposition of IO from the
point of view of a long-time imperative programmer. Don't miss it. One
to forward to friends and coworkers.
--
-
[redirecting to haskell-cafe]
On 3/1/07, Dave Tapley <[EMAIL PROTECTED]> wrote:
However this latter case gets stuck in an infinite loop, terminating on a stack
overflow.
My question asks why this is the case, when laziness should ensure only the
first 10 cases need to be computed.
You di
I think you want
Text.Regex. splitRegex
or something very much like it.
http://haskell.org/hoogle/?q=String-%3E%5BString%5D
2007/3/1, h. <[EMAIL PROTECTED]>:
Hello,
I wrote the following split function for Strings:
splitS :: String -> String -> [String]
splitS a b = splitA a b
where
The composite design pattern implemented using record types,
where the named elements are the interface to the object
Overall, I think I agree with Tim that the record types are simpler to code.
I'm not sure, though, what would happen if I tried to add state to the
types. With the previous exam
Walter Potter wrote:
> Folks,
>
> Given f:: a -> b it is very natural to lift f to P f :: P a -> P b where
> P is the power set functor. Or L f :: [a] -> [b].
>
> We are modeling structures using repeated application of the power
> functor, via repeated application of [ ].
>
> It would be very n
Folks,
Given f:: a -> b it is very natural to lift f to P f :: P a -> P b
where P is the power set functor. Or L f :: [a] -> [b].
We are modeling structures using repeated application of the power
functor, via repeated application of [ ].
It would be very nice if Haskell would recognize t
I did do something with quickcheck, more to learn quickCheck than
because it was really justified. Maybe it's overkill, maybe not,
whichever way here's what I have.
I would like prop_DroppedListLengthShorterOrSame to only test n > 0,
but haven't gotten around to figuring out how to restrict the i
Hello,
I wrote the following split function for Strings:
splitS :: String -> String -> [String]
splitS a b = splitA a b
where
z = length b - 1
splitA [] _ = [""]
splitA (c:cs) (d:ds) | c == d && fst s == ds = "" : splitA (snd s) b
| otherwise = (
On Thu, 2007-03-01 at 00:22 +, Claus Reinke wrote:
> >The main example of course is ByteString fusion as presented in our recent
> >paper:
> >http://www.cse.unsw.edu.au/~dons/papers/CSL06.html
>
> btw, why did you restrict yourself to improving [Char], rather than [a]?
We're not finished! :-
Matthew Brecknell:
Note the lambda abstraction (\st -> ...) at the beginning of the
definition. This means that (container >>= fn) returns a *function* that
maps an input state to the result of (container2 st2). It doesn't return
the result of (container st2) directly.
Ah. Silly me :D
Thank
22 matches
Mail list logo