Python: Now More Like Haskell Than Ever Before!

I've implemented a small monadic parser combinator library in Python
(based on Haskell code in a paper by Graham Hutton and Eric Meijer).

http://codepoetics.com/poetix/index.php?p=94

It enables you to write things like this:

> token = isalpha |seq| many(isdigit)
> tokens = token |sepBy| whitespace
> runParser("p123 q456 hello world", tokens)
['p123', 'q456']

It is probably entirely unsuited for any serious purpose, but might
qualify as an interesting hack...

Dominic
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to