On Friday 30 March 2007 06:59, Stefan O'Rear wrote:
> Anyway, I think parsec is *far* too big a hammer for the nail you're trying
> to hit.
In the end , the big hammer solution has become
parseLine = fmap (map fst. filter snd) $ many parser
where parser = do w <- option ("",False) parseAWord
On Friday 30 March 2007 11:54, Dougal Stanton wrote:
> On 30/03/07, Bayley, Alistair <[EMAIL PROTECTED]>
wrote:
> > > Mhh, still I don't see any them in my inbox mails , probably something
> > > buggy in gmail configuration, sorry :/.
> >
> > Are you expecting to see your sent message eventually a
On Friday 30 March 2007 11:44, Bayley, Alistair wrote:
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of Paolino
> >
> > > I'd start by not sextuple-posting, it just sextuples the
> >
> > ugliness ;-)
> > Mhh, still I don't see any them in my inbox mails , probably something
>
Hi,
I had a bad time trying to parse the words of a text.
I suspect I miss some parsec knowledge.
In the end it seems working, though I haven't tested much and this example
contains the main features I was looking.
*Main> parseTest (parseLine eof) "[EMAIL PROTECTED] sara,mimmo! 9ab a9b
Quoting Paolo Veronelli <[EMAIL PROTECTED]>:
> I paste new version in case you care give me some moe suggestion.
import Data.Maybe
import Data.List
import Data.Array.Diff
import System.Environment
import Control.Arrow
import Control.Monad
import Random
inc l i = l // [(i,l!i + 1)]
Quoting Udo Stenzel <[EMAIL PROTECTED]>:
> [EMAIL PROTECTED] wrote:
>
> It isn't, but not for the reasons you might suspect. You're using
> 'nub', which is quadratic, and your 'coupage' is also quadratic because
> it uses 'lookup' on a list, which is linear, a linear number of times.
> You can ge
Good year everyone.
I'm timing the following script.I'm not expert to evaluate th O'ness of this
code, I hope someone can do it.
The program clusters n integers in m buckets based on their distance.
Anyway I thing should be linear.So I timed som executions changing the first
arg.
First argument
I'm working on semantics and triples (RDF & co)
Python code for inference in based totally on dictionaries (associative
arrays ??),nested three or four times.
The result is astonishing me:compact beautiful modular and extremely
readable.
I imagine that haskell way should be different but I'm in
Usually I tend not to give much information to a subroutine intending to
restrict its liberty of touching the calling information.
So if I have an instance Inst which should be changed by an outside-Inst
computation Sub and I'm calling Sub with Sub(I'),I try to build the story
so that Sub
Most of my imperative pieces of software find their answers by touching
around in some space
of solutions and my favourite approximation algorithms use random
distributions.
Is it haskell the wrong languages for those, as I'm obliged to code them
inside Monads
loosing the benefits of lazyness?
Now I have my infinite tree inf
t =Leaf "1"
treeGrower :: Tree String-> Tree String
treeGrower (Leaf a )= treeGrower (Fork (Leaf (a++"1")) (Leaf (a++"2")))
treeGrower (Fork l r) = Fork (treeGrower l) (treeGrower r)
data Tree a = Fork (Tree a) (Tree a) | Leaf a deriving Show
inf=treeGrower t
I'd li
I want to build a binary tree where each leaf is a string of "L" and "R"
defining their position from the top
This should be done without context isn't it?
data Tree a = Fork (Tree a) (Tree a) | Leaf a deriving Show
t =Leaf ""
treeGrower :: Tree a -> Tree a
treeGrower (Leaf a )= treeGrower (Fork
On Sat, 3 Jul 2004 17:57:04 +0100 (BST), MR K P SCHUPKE
<[EMAIL PROTECTED]> wrote:
The zipper should work on n-ary trees. all the zipper does is
store the tree as (Context,Subtree)
What is the meaning of storing in haskell?
Imagine I put numbers in the leaves...
you could do something like
data C
I'd like to have a simple definition of the meanings of 'type' and 'data'
and maybe a clarifing example on their use.
I've read the Zipper doc on he wiki ,but I can't make it work on n-ary
trees,and most of all they are not any clear the performance hits on using
more complex 'data'
Ok Crypt Master give the hint to pronounce something ,because I feel a
complete stupid in front of Functional Programming' though I'm a trained
imperative one.
I've read the nice paper www.cs.chalmers.se/~rjmh/Papers/whyfp.html and
remember may years ago the hard job done to make my chess engi
15 matches
Mail list logo