WikiAdministration

Notes on Haskell

History

Version 1 (current)

Saved by someone unknown

Read this version

The first version: all of its text is new.

1# Notes on Haskell
2
3The wiki is written in Haskell and compiled to WebAssembly; the page you are reading was rendered by `Wiki.Core` in your browser.[^wasm]
4
5```haskell
6-- The slug a title suggests: lowercase ASCII, single dashes.
7slugify :: Text -> Maybe Slug
8
9fibonacci :: [Integer]
10fibonacci = 0 : 1 : zipWith (+) fibonacci (drop 1 fibonacci)
11```
12
13Laziness is what lets `fibonacci` be infinite: the $n$-th element is computed once something asks for it, and it grows like $\varphi^n$, where
14
15$$\varphi = \frac{1 + \sqrt{5}}{2}$$
16
17[^wasm]: With GHC's WebAssembly backend, through haskell-halogen.

What a page can hold