From a72906095c1ea7b2d24ca4368f8165f15ac22059 Mon Sep 17 00:00:00 2001 From: Jasper Van der Jeugt Date: Wed, 13 Mar 2013 20:27:45 +0100 Subject: Update recentFirst usage in tutorial 5 Closes #120 --- web/tutorials/05-snapshots-feeds.markdown | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'web/tutorials') 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 ``` -- cgit v1.2.3