🐙 Templated web page generator for your git repositories
git clone https://github.com/m-col/gitja
Files | Refs | Readme | License

Commit 25c8db469d54bec4ef9189fc680eabf8fc3286c6
Parent: d2e1084ee621a1c67b0b59ec0fd7647940db29d0
Author: mcol <mcol@posteo.net>
Date: 2021-09-30 02:01:41 +0100
Committer: mcol <mcol@posteo.net>
Committed: 2021-09-30 02:01:41 +0100

Use goldfinch combinator to pointfree-ise writeTo

src/Templates.hs Modified

@@ -149,4 +149,8 @@
 This function gets the output HTML data and is responsible for saving it to file.
 -}
 writeTo :: FilePath -> Html -> IO ()
-writeTo path = appendFile path . unpack . htmlSource
+writeTo = flip $ goldfinch appendFile (unpack . htmlSource)
+
+-- G combinator - goldfinch.
+goldfinch :: (b -> c -> d) -> (a -> c) -> a -> b -> d
+goldfinch f g x y = f y (g x)