Hi all,
Thanks for your welcome and helpful comments. I've banged out a first
attempt at a Haskell library and was curious if anybody would have
time or interest in looking it over it for style, design, stuff that's
just wrong, or (most likely) stuff that's been done better elsewhere.
I'm willing
Owen Smith wrote:
Hi all,
Thanks for your welcome and helpful comments. I've banged out a first
attempt at a Haskell library and was curious if anybody would have
time or interest in looking it over it for style, design, stuff that's
just wrong, or (most likely) stuff that's been done better
Using the code developed for ByteStrings by myself, Christ Kuklewicz
and Daniel Fischer, I've implemented Knuth-Morris-Pratt substring
searching on Data.Sequence Seq values. Attached you'll find the
library in kmp.zip.safe. The algorithm is implemented in the module
Data.Sequence.KMP.
At the
Hi,
I'm working on another article like
http://www.linuxjournal.com/article/8850. This time, I'm taking an
exercise out of Expert C Programming: Deep C Secrets and
translating it into Haskell. The program translates C type
declarations into English. I would greatly appreciate some code
Hi,
You seem to like let a lot, whereas I hardly ever use them. In general
I find where a lot more readable.
(disclaimer, all notes untested, may not compile, may be wrong)
Also, most haskell programs use $ instead of |
-- For convenience:
currTokType :: ParseContext - TokenType
currTokType
Neil Mitchell wrote:
stackTop ctx =
let (x:xs) = stack ctx in x
stackTop ctx = head ctx
stackTop ParseContext{stack=x:_} = x
or:
stackTop ctx = head (stack ctx)
===stackTop ctx = head . stack $ ctx
===stackTop = head . stack
Regards, Brian.
On 2006 March 05 Sunday 05:43, Shannon -jj Behrens wrote:
classifyString s = Token (whichType s) s
where whichType volatile = Qualifier
whichType void = Type
whichType char = Type
whichType signed = Type
whichType unsigned = Type