From f67ce40adf3a62e453734b51e956aa1e7175cee9 Mon Sep 17 00:00:00 2001 From: David Roundy Date: Fri, 1 Jun 2007 20:31:47 +0200 Subject: fix error in select. darcs-hash:20070601183147-72aca-7e72a8a8953398776e0a9f0d9a8ed51fe982b2b3.gz --- Anneal.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Anneal.hs b/Anneal.hs index 093a570..52f7048 100644 --- a/Anneal.hs +++ b/Anneal.hs @@ -57,8 +57,8 @@ metropolis x = do r <- gets rate then modify $ \s -> s { current = rx } else return () -select :: [a] -> State (Anneal x) a -select [] = error "empty list in select" +select :: [a] -> State (Anneal a) a +select [] = the_value `fmap` gets best select [x] = return x select xs = do n <- getOne (0,length xs - 1) return (xs !! n) -- cgit v1.2.3