aboutsummaryrefslogtreecommitdiff
path: root/pia/n7.lyx
diff options
context:
space:
mode:
authorJuan Marin Noguera <juan@mnpi.eu>2023-01-25 12:53:51 +0100
committerJuan Marin Noguera <juan@mnpi.eu>2023-01-25 12:53:51 +0100
commit8e44c44aff96736ab0d529c44cfcd5cfdac68dfa (patch)
tree44cb76238b24d7086ece58641859e11008232afe /pia/n7.lyx
parentde18ff7a6082d8c3ba37b681ba4cc1057cc437f0 (diff)
Erratas
Esta vez en algunas asignaturas no llegué a comprobar erratas: - En funcional a partir de 2.11 - En DSI - En conmutativa a partir de la enumeración antes del lema de Artin en 3.8
Diffstat (limited to 'pia/n7.lyx')
-rw-r--r--pia/n7.lyx45
1 files changed, 27 insertions, 18 deletions
diff --git a/pia/n7.lyx b/pia/n7.lyx
index 0e78e74..4ff3ce7 100644
--- a/pia/n7.lyx
+++ b/pia/n7.lyx
@@ -469,7 +469,7 @@ sequence_ = foldr (>>) (return ())
\begin_layout Plain Layout
-mapM_ :: Monad m => (a -> m b) -> [a] -> m [b]
+mapM_ :: Monad m => (a -> m b) -> [a] -> m ()
\end_layout
\begin_layout Plain Layout
@@ -602,12 +602,17 @@ putStr, putStrLn :: String -> IO ()
\begin_layout Plain Layout
-putStr s = map_ putChar s
+putStr s = mapM_ putChar s
\end_layout
\begin_layout Plain Layout
-putStrLn s = putStr s >> putStr
+putStrLn s = do putStr s
+\end_layout
+
+\begin_layout Plain Layout
+
+ putStr
\begin_inset Quotes cld
\end_inset
@@ -645,9 +650,12 @@ getLine :: IO String
\begin_layout Plain Layout
-getLine = getChar >>=
-\backslash
-c -> if c == '
+getLine = do c <- getChar
+\end_layout
+
+\begin_layout Plain Layout
+
+ if c == '
\backslash
n' then return
\begin_inset Quotes cld
@@ -662,9 +670,12 @@ n' then return
\begin_layout Plain Layout
- else getLine >>=
-\backslash
-s -> return (c:s)
+ else do s <- getLine
+\end_layout
+
+\begin_layout Plain Layout
+
+ return (c:s)
\end_layout
\end_inset
@@ -706,31 +717,29 @@ interact :: (String -> String) -> IO ()
\begin_layout Plain Layout
-interact f = hSetBuffering stdin NoBuffering >>=
+interact f = do hSetBuffering stdin NoBuffering
\end_layout
\begin_layout Plain Layout
- hSetBuffering stdout NoBuffering >>=
+ hSetBuffering stdout NoBuffering
\end_layout
\begin_layout Plain Layout
- s <- getContents >>= putStr (f s)
+ s <- getContents
\end_layout
\begin_layout Plain Layout
- where hSetBuffering = ...
+ putStr (f s)
\end_layout
-\end_inset
-
+\begin_layout Plain Layout
+ where hSetBuffering = ...
\end_layout
-\begin_layout Standard
-\begin_inset Newpage pagebreak
\end_inset
@@ -802,7 +811,7 @@ Un programa en Haskell es una colección de módulos de los que uno es el
\family typewriter
main :: IO ()
\family default
-, que se ejecuta al ejecutar el programa.
+, que se ejecuta al iniciar el programa.
\end_layout
\end_body