on master help sign in
Update recentFirst usage in tutorial 5

Closes #120

commita72906095c1ea7b2d24ca4368f8165f15ac22059 authorJasper Van der Jeugt <m@jaspervdj.be> dateWed 13 Mar 2013, 20:27 (14 years ago) parentd840363
1 file changed+3−2
web/tutorials/05-snapshots-feeds.markdown+3−2
web/tutorials/05-snapshots-feeds.markdown+3−2
@@ -51,7 +51,7 @@ create ["atom.xml"] $ do
5151 let feedCtx = postCtx `mappend`
5252 constField "description" "This is the post description"
5353
54− posts <- take 10 . recentFirst <$> loadAll "posts/*"
54+ posts <- fmap (take 10) . recentFirst =<< loadAll "posts/*"
5555 renderAtom myFeedConfiguration feedCtx posts
5656```
5757
@@ -122,6 +122,7 @@ create ["atom.xml"] $ do
122122 route idRoute
123123 compile $ do
124124 let feedCtx = postCtx `mappend` bodyField "description"
125− posts <- take 10 . recentFirst <$> loadAllSnapshots "posts/*" "content"
125+ posts <- fmap (take 10) . recentFirst =<<
126+ loadAllSnapshots "posts/*" "content"
126127 renderAtom myFeedConfiguration feedCtx posts
127128```