This file contains 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
* Importance of category theory | |
* Answers the question: "What is a *timeless* API?" | |
* What does "timeless" mean? | |
* Likely to still be relevant years from now | |
* Likely to be low maintenance (since unlikely to change) | |
* Less likely to be subject to controversy or discussion ("obvious") | |
* Examples: | |
* Everything Haskell's typeclassopedia (except maybe `Foldable`) | |
* Categories / Monoids | |
* `(.)` / `id` |
This file contains 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
COLLECTION 0 1 5 10 50 100 500 1000 | |
Array[Int] 16 24 40 56 216 416 2016 4016 | |
immutable.BitSet 24 24 24 24 24 32 96 160 | |
immutable.IntMap[Int] 16 40 328 688 3568 7168 35968 71968 | |
immutable.List[Int] 16 56 216 416 2016 4016 20016 40016 | |
immutable.Map[Int,Int] 16 40 304 720 4856 9680 53504 111760 | |
immutable.Queue[Int] 40 80 240 440 2040 4040 20040 40040 | |
immutable.Set[Int] 16 32 264 480 3016 5840 27696 57952 | |
immutable.SortedMap[Int,Int] 40 88 280 520 2440 4840 30008 62008 | |
immutable.SortedSet[Int] 40 104 296 536 2456 |
This file contains 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
-- | Main entry point to the application. | |
module Main where | |
import Control.Monad.Reader | |
import Control.Monad.Writer | |
{- | |
The ReaderT transformer is used to retrieve a read-only value from some environment. | |
The WriterT transformer will log the result of each retrieval. | |
Running the two transformers together yields a log of each step along with the actual results. |
This file contains 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
# Scaladoc Developer Guide | |
## Introduction | |
Scaladoc is the tool that enables developers to automatically generate documentation for their Scala (and Java) projects. It is Scala's equivalent of the widely-used Javadoc tool. This means that Javadoc (and even doxygen) users will be familiar with Scaladoc from day 1: for them, it is most beneficial to check out the Scaladoc/Javadoc comparison tables and if necessary, skim through this document to understand specific features. | |
The rest of this tutorial is aimed at developers new to Scaladoc and other similar tools. It assumes a basic understanding of the Scala language, which is necessary to follow the examples given throughout the tutorial. For the user perspective on the Scaladoc-generated documentation, such as finding a class, understanding the page layout, navigating through diagrams, please refer to the Scaladoc User Guide. | |
The tutorial will start by a short motivation and then will explain the main concept in Scaladoc: the doc comment. | |
### Why document? |