Improve tesla weapon path
This commit is contained in:
@@ -25,3 +25,12 @@ iterateUntil t m = do
|
||||
|
||||
iterateWhile :: Monad m => (a -> Bool) -> m a -> m a
|
||||
iterateWhile t = iterateUntil (not . t)
|
||||
|
||||
unfoldrMID :: (Monad m) => (a -> m (Maybe a)) -> a -> m [a]
|
||||
unfoldrMID f = go
|
||||
where
|
||||
go z = do
|
||||
x <- f z
|
||||
case x of
|
||||
Nothing -> return [z]
|
||||
Just y -> (z :) <$> go y
|
||||
|
||||
Reference in New Issue
Block a user