List/Generator Monad Combinators

Category: Python - Education

The List monad in Haskell has many uses, including parsing and nondeterministic algorithms. This code implements the Monad combinators "bind", "return" and "fail", and the MonadPlus combinators "plus" and "zero". It works with all iterables, and returns a generator rather than a list in order to preserve a lazy semantics. Date: 15 February, 2012


Parsing Algorithms - Nondeterministic Algorithms - Monad Combinators - Nondeterministic - Parsing - Algorithms

Homepage: http://code.activestate.com/

Developer: code.activestate.com

License: Freeware

Operating System: All

Add a Comment

all are required fields

     
What do you think of this resource?

Select Your Rate:

Votes:0

 

Related Scripts Download

Texpand class provides a way to expand textareas to fit it's contents.

developer Developer: Arturs Sosins
license License: BSD License
operating systems Operating System: Not Available


Tmatrix class generates transformation matrix from provided transformations.

developer Developer: Arturs Sosins
license License: BSD License
operating systems Operating System: Not Available


This script easily extract data from microsoft excel files using this wrapper class for xlrd.

developer Developer: code.activestate.com
license License: Freeware
operating systems Operating System: All


Battle.

developer Developer: planet-source-code.com
license License: Freeware
operating systems Operating System: All


BibTeX is a text-based file format for listing bibliographical references.

developer Developer: SourceForge.net
license License: Freeware
operating systems Operating System: All


The module optparse was a great addition to Python 2.

developer Developer: code.activestate.com
license License: Freeware
operating systems Operating System: All


Instead of using $KCODE = 'UTF8' together with require 'jcode' you can use the /u regex parameter to parse UTF-8 strings containing multibyte characters.

developer Developer: snippets.dzone.com
license License: Freeware
operating systems Operating System: Linux


All methods on this heap preserve the heap property invariant; therefore there is no need for is_heap().

developer Developer: code.activestate.com
license License: Freeware
operating systems Operating System: All


This script parses the online documentation for compiler.

developer Developer: code.activestate.com
license License: Freeware
operating systems Operating System: All