diff options
| author | Gregor Kleen <gkleen@yggdrasil.li> | 2015-04-07 19:34:18 +0200 |
|---|---|---|
| committer | Gregor Kleen <gkleen@yggdrasil.li> | 2015-04-07 19:34:18 +0200 |
| commit | 42c0849549032ca665c165ca7ffb19bb59692431 (patch) | |
| tree | b1b7b4eff185a4d693a19787d132f73694f449a9 | |
| parent | 7646eb44b045ea9d955bbcdbcb20acb9ab35634b (diff) | |
| download | dirty-haskell.org-42c0849549032ca665c165ca7ffb19bb59692431.tar dirty-haskell.org-42c0849549032ca665c165ca7ffb19bb59692431.tar.gz dirty-haskell.org-42c0849549032ca665c165ca7ffb19bb59692431.tar.bz2 dirty-haskell.org-42c0849549032ca665c165ca7ffb19bb59692431.tar.xz dirty-haskell.org-42c0849549032ca665c165ca7ffb19bb59692431.zip | |
Syntax highlighting in source listings
| -rw-r--r-- | posts/blog-rss.md | 24 | ||||
| -rw-r--r-- | 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: | |||
| 16 | 16 | ||
| 17 | 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: | 17 | 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: |
| 18 | 18 | ||
| 19 | (<->) :: [(a -> b)] -> a -> [b] | 19 | ~~~ {.haskell} |
| 20 | [] <-> _ = [] | 20 | (<->) :: [(a -> b)] -> a -> [b] |
| 21 | (f:fs) <-> x = (f x:fs <-> x) | 21 | [] <-> _ = [] |
| 22 | (f:fs) <-> x = (f x:fs <-> x) | ||
| 22 | 23 | ||
| 23 | (<-->) :: [(a -> a)] -> a -> a | 24 | (<-->) :: [(a -> a)] -> a -> a |
| 24 | [] <--> x = x | 25 | [] <--> x = x |
| 25 | (f:fs) <--> x = fs <--> (f x) | 26 | (f:fs) <--> x = fs <--> (f x) |
| 27 | ~~~ | ||
| 26 | 28 | ||
| 27 | ## Update ## | 29 | ## Update ## |
| 28 | 30 | ||
| 29 | import Control.Applicative ((<*>), pure) | 31 | ~~~ {.haskell} |
| 32 | import Control.Applicative ((<*>), pure) | ||
| 30 | 33 | ||
| 31 | (<->) fs = (<*>) fs . pure | 34 | (<->) fs = (<*>) fs . pure |
| 32 | 35 | ||
| 33 | (<-->) = flip $ foldl (.) id | 36 | (<-->) = flip $ foldl (.) id |
| 37 | ~~~ | ||
| 34 | 38 | ||
| 35 | Thanks, viktor. \ No newline at end of file | 39 | Thanks, viktor. |
| @@ -28,5 +28,9 @@ p { | |||
| 28 | 28 | ||
| 29 | p + p { | 29 | p + p { |
| 30 | text-indent: 1.5em; | 30 | text-indent: 1.5em; |
| 31 | margin-top: 0 | 31 | margin-top: 0; |
| 32 | } | ||
| 33 | |||
| 34 | pre { | ||
| 35 | margin-left: 1.5em; | ||
| 32 | } | 36 | } |
