diff --git a/examples/fact.html b/examples/fact.html index db3e135f..4f849dd4 100644 --- a/examples/fact.html +++ b/examples/fact.html @@ -2,11 +2,29 @@ Factorials + + +

-

+

diff --git a/examples/fact.lhs b/examples/fact.lhs index e41c6ae3..4ede5469 100644 --- a/examples/fact.lhs +++ b/examples/fact.lhs @@ -16,7 +16,10 @@ instance Yesod Fact where |] index = return $ StaticFile TypeHtml "examples/fact.html" -fact i = return $ toHtmlObject $ show $ product [1..fromIntegral i] +fact i = return $ toHtmlObject + [ ("input", show i) + , ("result", show $ product [1..fromIntegral i]) + ] factRedirect = do i <- getParam "num" redirect $ "../" ++ i ++ "/"