Fixed a typo in the map function example

This commit is contained in:
mjh 2022-10-04 00:45:09 -07:00 committed by GitHub
parent d1694c4c65
commit 10e496dcd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,7 +22,7 @@ Pure functions are defined via equations, as in [Haskell](https://www.haskell.or
// Applies a function to every element of a list
map <a> <b> (list: List a) (f: a -> b) : List b
map a b Nil f = Nil
map a b (Cons head tail) f = Cons (f x) (map tail f)
map a b (Cons head tail) f = Cons (f head) (map tail f)
```
Side-effective programs are written via monadic monads, resembling [Rust](https://www.rust-lang.org/) and [TypeScript](https://www.typescriptlang.org/):