forked from GitHub/gf-core
fix PGF.Generate.restart. The restart should be done only if there are some solutions found
This commit is contained in:
@@ -148,5 +148,5 @@ restart :: RandomGen g => g -> (g -> [a]) -> [a]
|
||||
restart g f =
|
||||
let (g1,g2) = split g
|
||||
in case f g1 of
|
||||
[] -> restart g2 f
|
||||
[] -> []
|
||||
(x:xs) -> x : restart g2 f
|
||||
|
||||
Reference in New Issue
Block a user