[Haskell-cafe] Linear programming in Haskell

Henning Thielemann lemming at henning-thielemann.de
Mon Mar 1 10:29:48 EST 2010

On Sun, 28 Feb 2010, Louis Wasserman wrote:

> It's an expensive operation, though -- since I don't track the set of all
> variables as the LP is built, I need to construct the set of all variables
> before generating new ones -- so it's recommended that you get all the
> variables you need in one or two passes.

Then you might prefer a single operation that generates all variables and 
runs an enclosed problem on them:

run :: ([Variable] -> LP a) -> LP a

Use as

run $ \x0:x1:x2:_ -> do

More information about the Haskell-Cafe mailing list