Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
paradigmas_1C2025
tp1_funcional
Commits
29beca85
Commit
29beca85
authored
Apr 03, 2025
by
sergio davila
Browse files
fix problema de identacion y tipo en ej 1
parent
7490f99f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
Documento.hs
Documento.hs
+2
-3
No files found.
Documento.hs
View file @
29beca85
...
...
@@ -29,13 +29,12 @@ texto [] = Vacio
texto
t
=
Texto
t
Vacio
-- foldDoc chequear
foldDoc
::
b
->
(
s
tring
->
b
->
b
)
->
(
Int
->
b
->
b
)
->
Doc
->
b
foldDoc
::
b
->
(
S
tring
->
b
->
b
)
->
(
Int
->
b
->
b
)
->
Doc
->
b
foldDoc
casoVacio
casoTexto
casoLinea
documento
=
case
documento
of
Vacio
->
casoVacio
Texto
s
d
->
casoTexto
s
(
rec
d
)
Linea
i
d
->
casoLinea
i
(
rec
d
)
where
rec
=
foldDoc
casoVacio
casoTexto
casoLinea
where
rec
=
foldDoc
casoVacio
casoTexto
casoLinea
-- NOTA: Se declara `infixr 6 <+>` para que `d1 <+> d2 <+> d3` sea equivalente a `d1 <+> (d2 <+> d3)`
-- También permite que expresiones como `texto "a" <+> linea <+> texto "c"` sean válidas sin la necesidad de usar paréntesis.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment