diff options
-rw-r--r-- | posts/blog-rss.md | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/posts/blog-rss.md b/posts/blog-rss.md index 559a6c6..f7116a9 100644 --- a/posts/blog-rss.md +++ b/posts/blog-rss.md | |||
@@ -23,3 +23,13 @@ Along the way two helper functions were introduced — if an implementation of t | |||
23 | (<-->) :: [(a -> a)] -> a -> a | 23 | (<-->) :: [(a -> a)] -> a -> a |
24 | [] <--> x = x | 24 | [] <--> x = x |
25 | (f:fs) <--> x = fs <--> (f x) | 25 | (f:fs) <--> x = fs <--> (f x) |
26 | |||
27 | == Update | ||
28 | |||
29 | import Control.Applicative ((<*>), pure) | ||
30 | |||
31 | (<->) fs = (<*>) fs . pure | ||
32 | |||
33 | (<-->) = flip $ foldl (.) id | ||
34 | |||
35 | Thanks, viktor. \ No newline at end of file | ||