aboutsummaryrefslogtreecommitdiffstats
path: root/Anneal.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Anneal.hs')
-rw-r--r--Anneal.hs4
1 files 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)