FreshLists skeleton
This commit is contained in:
parent
d79c4b6f46
commit
8fc5a0fbda
4 changed files with 32 additions and 0 deletions
|
@ -19,6 +19,7 @@ authors = "Nathan McCarty"
|
|||
modules = Idris
|
||||
, Posts.HelloWorld
|
||||
, LessMacrosMoreTypes.Printf
|
||||
, DependentNuggets.FreshLists
|
||||
|
||||
-- main file (i.e. file to load at REPL)
|
||||
-- main =
|
||||
|
|
8
projects/Idris/src/DependentNuggets/FreshLists.md
Normal file
8
projects/Idris/src/DependentNuggets/FreshLists.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
# FreshLists: Containers That Only Accept "Fresh" Elements
|
||||
|
||||
```idris hide
|
||||
module DependentNuggets.FreshLists
|
||||
```
|
||||
|
||||
When programming, we quite frequently encounter the for a data structure that can contain at most one of each given element. Typically, we would use a `Set`, which satisfies this constraint, but does so as a runtime invariant that must be taken on trust, and results in ergonomic concerns when used as a component of API design.
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue