RE: lazy comparison for equality ?

2002-04-24 Thread Konst Sushenko
In addition to what Hal said, I think that even assuming that you want to write a function like that that is only supposed to be applied to finite lists (like, say, prelude's 'and' function, which does not terminate on an infinite list of True values) you still cannot do it because haskell lists

RE: if (++) were left associative ?

2002-04-07 Thread Konst Sushenko
> > I don't think so. I think it only takes linear time to get the head. > But once you've gotten the head, it takes linear time again to get the > head of the tail, You get (I think...) a progression like > n+(n-1)+(n-2)+...+1, which is in O(n^2). > What does 'n' denote? The get the he

RE: if (++) were left associative ?

2002-04-07 Thread Konst Sushenko
ons. Right? konst > -Original Message- > From: Jay Cox [mailto:[EMAIL PROTECTED]] > Sent: Sunday, April 07, 2002 11:09 AM > To: Konst Sushenko > Cc: [EMAIL PROTECTED]; Jon Fairbairn > Subject: Re: if (++) were left associative ? > > > On Sun, 7 Apr 2002, Jon

RE: if (++) were left associative ?

2002-04-07 Thread Konst Sushenko
Thanks, but it still does not help... > Well, you've removed the parentheses that give you the > information you want. > Yes, I overlooked the parentheses. I meant what you said below: > foldl (++) [] [[1],[2],[3],[4]] ... > -> [] ++ [1]) ++ [2]) ++ [3]) ++ [4]) > > now you have to ask

RE: if (++) were left associative ?

2002-04-07 Thread Konst Sushenko
Feuer [mailto:[EMAIL PROTECTED]] > Sent: Sunday, April 07, 2002 3:21 AM > To: [EMAIL PROTECTED] > Subject: Re: if (++) were left associative ? > > > On Sun, Apr 07, 2002, Konst Sushenko wrote: > > Hello, > > > > this is probably embarrassing, but I just realised that

if (++) were left associative ?

2002-04-07 Thread Konst Sushenko
Hello, this is probably embarrassing, but I just realised that I do not understand why list concatenation operation takes quadratic time if it is associated from left to right (see e.g. 'The Haskell School of Expression' by Hudak, p. 335): cat1 = (++) cat2 = (++) ( [1,2]

RE: finding ....

2002-03-19 Thread Konst Sushenko
Moved to haskell café I do not have a code example, but how about a system that compiles different (and say independent) software projects in parallel, and which uses the same code to create temporary files needed for compilation? konst > -Original Message- > From: David Sankel [mailt

RE: Hiring Haskell programmers

2002-03-11 Thread Konst Sushenko
I have always been wondering what exactly does "quickly learn Haskell" mean? Quickly learn Haskell syntax? Can one learn how to paint quickly? konst > -Original Message- > From: Eray Ozkural [mailto:[EMAIL PROTECTED]] > Sent: Monday, March 11, 2002 4:24 PM > To: Mark Carroll; [EMAIL PRO

RE: Ground Up

2002-02-28 Thread Konst Sushenko
a word from a beginner (with a CS background): Alternatively, just do not use compiler specific features in your programs and this will make your programs work with different compilers. I went away from Lisp because there are no types. someone said once that Lisp is a sort of intermediate langua

order of evaluation ?

2002-02-17 Thread Konst Sushenko
Title: Message hello,   below is the code that i wrote as an excercise for myself (I am still learning haskell).   it implements a straighforward way to simplify boolean expressions, and should be self-explanatory.   my question is, if i have an expression such as ((Const False) :&: ), will

RE: efficiency question

2002-02-08 Thread Konst Sushenko
t use more stack if not because of laziness? konst > -Original Message- > From: Hal Daume III [mailto:[EMAIL PROTECTED]] > Sent: Friday, February 08, 2002 4:35 PM > To: Jorge Adriano > Cc: Konst Sushenko; [EMAIL PROTECTED] > Subject: Re: efficiency question > > >

examples using built-in state monad

2001-02-26 Thread Konst Sushenko
hello,   in my program i used my own parameterised state transformer monad, which is well described in literature:   newtype State s m a = ST (s -> m (a,s)) ghc and hugs contain built in implementation of state monad ST.   is it the same thing? the documentation is not clear on that.  

RE: newbie: running a state transformer in context of a state reader

2001-02-20 Thread Konst Sushenko
yk [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 20, 2001 10:17 AM To: [EMAIL PROTECTED] Subject: Re: newbie: running a state transformer in context of a state reader Mon, 19 Feb 2001 18:07:17 -0800, Konst Sushenko <[EMAIL PROTECTED]> pisze: > now i am curious if it is possible to r

newbie: running a state transformer in context of a state reader

2001-02-19 Thread Konst Sushenko
hello,   i have a parser which is a state transformer monad, and i need to implement a lookahead function, which applies a given parser but does not change the parser state. so i wrote a function which reads the state, applies the parser and restores the state (the State monad is derived fro

RE: need help w/ monad comprehension syntax

2001-02-15 Thread Konst Sushenko
PROTECTED]] Sent: Thursday, February 15, 2001 5:22 PM To: [EMAIL PROTECTED] Subject: need help w/ monad comprehension syntax Konst Sushenko writes: | what am i missing? : | > --g :: State String Char | > g = [ x | x <- return 'a' ] Hi. The comprehension syntax used to

need help w/ monad comprehension syntax

2001-02-15 Thread Konst Sushenko
hello,   i am having trouble getting my program below to work. i think i implemented the monad methods correctly, but the function 'g' does not type as i would expect. Hugs thinks that it is just a list (if i remove the explicit typing). i want it to be functionally identical to the functio