From e86fbe9d5a69a3b72fbacd862cefc4c93687ac00 Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Fri, 16 Aug 2024 06:40:37 -0700 Subject: [PATCH] docs: add readme --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..82ef431 --- /dev/null +++ b/README.md @@ -0,0 +1,13 @@ +# Suntheme + +runs a script on sunrise and sunset, written in pure haskell. + +You may be wondering how a program written in Haskell, the purely functional +programming language, could possibly act on the real world by running a so-called "script". + +It's simple. We take in the entire World as an input to a pure function, the IO Monad. +It then maps the original World to the changed World, with our desired IO actions carefully applied. + +> From the second perspective, an IO action transforms the whole world. IO actions are actually pure, because they receive a unique world as an argument and then return the changed world. + +See [this](https://lean-lang.org/functional_programming_in_lean/monads/io.html) for more information.