Is it possible to write a function with signature Monad m => (a -> m a) -> m (a -> a)
?
For example I have a function
func :: Int -> IO Int
func n = pure $ n + 1
Can I transform it into func' :: IO (Int -> Int)
?
Is it possible to write a function with signature Monad m => (a -> m a) -> m (a -> a)
?
For example I have a function
func :: Int -> IO Int
func n = pure $ n + 1
Can I transform it into func' :: IO (Int -> Int)
?