Problem 2 post done, need to verify results
This commit is contained in:
parent
776a3e1ec9
commit
1bc77d75d1
1 changed files with 8 additions and 2 deletions
|
@ -1134,13 +1134,19 @@ f a b c (n+3) = a * f a b c (n+2) + b * f a b c (n+1) + c * f a b c n
|
||||||
\subsection*{Problema 2}
|
\subsection*{Problema 2}
|
||||||
Gene de |tax|:
|
Gene de |tax|:
|
||||||
\begin{code}
|
\begin{code}
|
||||||
gene = (id -|- id >< (groupBy (\x y -> countSpaces x >= 0 && countSpaces y > 0) . map (drop 4))) . out
|
gene = (id -|- (id >< (groupBy (\x y -> countSpaces x >= 0 && countSpaces y > 0) . map (drop 4)))) . out
|
||||||
|
|
||||||
countSpaces = length . takeWhile (== ' ')
|
countSpaces = length . takeWhile (== ' ')
|
||||||
\end{code}
|
\end{code}
|
||||||
Função de pós-processamento:
|
Função de pós-processamento:
|
||||||
\begin{code}
|
\begin{code}
|
||||||
post = undefined
|
post :: Exp String String -> [[String]]
|
||||||
|
post = cataExp (genepost)
|
||||||
|
|
||||||
|
genepost = (either leftSide rightSide)
|
||||||
|
leftSide = singl . singl
|
||||||
|
rightSide = cons . (split (singl . p1) (map cons . lstr . (id >< concat)))
|
||||||
|
|
||||||
\end{code}
|
\end{code}
|
||||||
|
|
||||||
\subsection*{Problema 3}
|
\subsection*{Problema 3}
|
||||||
|
|
Loading…
Reference in a new issue