From 42c0849549032ca665c165ca7ffb19bb59692431 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 7 Apr 2015 19:34:18 +0200 Subject: Syntax highlighting in source listings --- posts/blog-rss.md | 24 ++++++++++++++---------- style.css | 6 +++++- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/posts/blog-rss.md b/posts/blog-rss.md index f7dbe37..4e8cb24 100644 --- a/posts/blog-rss.md +++ b/posts/blog-rss.md @@ -16,20 +16,24 @@ Each item carries a title, an url, a date, and contents as follows: Along the way two helper functions were introduced — if an implementation of those already exists in Prelude or somewhere else common please mail in a comment: - (<->) :: [(a -> b)] -> a -> [b] - [] <-> _ = [] - (f:fs) <-> x = (f x:fs <-> x) +~~~ {.haskell} +(<->) :: [(a -> b)] -> a -> [b] +[] <-> _ = [] +(f:fs) <-> x = (f x:fs <-> x) - (<-->) :: [(a -> a)] -> a -> a - [] <--> x = x - (f:fs) <--> x = fs <--> (f x) +(<-->) :: [(a -> a)] -> a -> a +[] <--> x = x +(f:fs) <--> x = fs <--> (f x) +~~~ ## Update ## - import Control.Applicative ((<*>), pure) +~~~ {.haskell} +import Control.Applicative ((<*>), pure) - (<->) fs = (<*>) fs . pure +(<->) fs = (<*>) fs . pure - (<-->) = flip $ foldl (.) id +(<-->) = flip $ foldl (.) id +~~~ -Thanks, viktor. \ No newline at end of file +Thanks, viktor. diff --git a/style.css b/style.css index 21610b0..847cfe2 100644 --- a/style.css +++ b/style.css @@ -28,5 +28,9 @@ p { p + p { text-indent: 1.5em; - margin-top: 0 + margin-top: 0; +} + +pre { + margin-left: 1.5em; } -- cgit v1.2.3