summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasper Van der Jeugt <m@jaspervdj.be>2013-03-13 20:27:45 +0100
committerJasper Van der Jeugt <m@jaspervdj.be>2013-03-13 20:27:45 +0100
commita72906095c1ea7b2d24ca4368f8165f15ac22059 (patch)
tree7a8982176a159400e1bee37891e5eca2b654eac8
parentd840363bf0edbbd703e1a7d2e2700c5feeedbbc6 (diff)
downloadhakyll-a72906095c1ea7b2d24ca4368f8165f15ac22059.tar.gz
Update recentFirst usage in tutorial 5
Closes #120
-rw-r--r--web/tutorials/05-snapshots-feeds.markdown5
1 files changed, 3 insertions, 2 deletions
diff --git a/web/tutorials/05-snapshots-feeds.markdown b/web/tutorials/05-snapshots-feeds.markdown
index 230a703..a8c06c6 100644
--- a/web/tutorials/05-snapshots-feeds.markdown
+++ b/web/tutorials/05-snapshots-feeds.markdown
@@ -51,7 +51,7 @@ create ["atom.xml"] $ do
let feedCtx = postCtx `mappend`
constField "description" "This is the post description"
- posts <- take 10 . recentFirst <$> loadAll "posts/*"
+ posts <- fmap (take 10) . recentFirst =<< loadAll "posts/*"
renderAtom myFeedConfiguration feedCtx posts
```
@@ -122,6 +122,7 @@ create ["atom.xml"] $ do
route idRoute
compile $ do
let feedCtx = postCtx `mappend` bodyField "description"
- posts <- take 10 . recentFirst <$> loadAllSnapshots "posts/*" "content"
+ posts <- fmap (take 10) . recentFirst =<<
+ loadAllSnapshots "posts/*" "content"
renderAtom myFeedConfiguration feedCtx posts
```