The following are appendices from Optics By Example, a comprehensive guide to optics from beginner to advanced! If you like the content below, there's plenty more where that came from; pick up the book!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
timestamp :: String -> Q a -> Q a | |
timestamp name action = do | |
start <- runIO getCurrentTime | |
runIO $ putStrLn $ "Starting " <> name <> ": " <> show start | |
a <- action | |
end <- runIO getCurrentTime | |
runIO $ do | |
putStrLn $ "Ending " <> name <> ": " <> show end | |
putStrLn $ "Elapased " <> name <> ": " <> show (diffUTCTime end start) | |
pure a |
Lately I have been busy reading some new books on Domain Driven Design (DDD) and software architecture -- including a short yet eye-opening one in Python and a great one in F#. At the same time, it seems that more people in the Functional Programming world are looking at more formal approaches to modelling -- some examples here. This has brought some thought from the background of my brain about how we should model, organize, and architect software using the lessons we've learnt from functional programming.
Before moving on, let me be clear about this being just a dump of some thoughts, not always well-defined, definite
OlderNewer