Constructing Casestructing Cases Carl McTague
A./C. Luis Pablo Michelena
lmichele@multi.com.uy
Mon, 27 May 2002 03:11:48 -0300
Maybe using some sort of binary search (using an array or another apropiate
data structure) or dictionary search, would make o(log n) time complexity
function, which could be actually faster than the pattern matcher.
Cheers,
Luis
PD: This is very similar to the asociatives data types in lenguages like
perl or phyton, but donīt know what solution have been used in those
languages.
----- Original Message -----
From: Carl McTague <mctague@one.net>
To: <haskell-cafe@haskell.org>
Sent: Friday, May 24, 2002 10:52 AM
Subject: Re: Constructing Casestructing Cases Carl McTague
> > Is there a way to do this? Note, I don't want to define a function
> > that searches through the list each time it is invoked, I want to
> > generate the function once and have it be as fast as the
> > pattern-matcher can make it.
>
> Actually, would the pattern-matcher be doing little more than a linear
> search through list in this case?
>
> Thanks,
> Carl
>
>