From 10e496dcd21e3b2fc6aac32dc44fcb6cd3fb05b5 Mon Sep 17 00:00:00 2001 From: mjh <61671361+mjh316@users.noreply.github.com> Date: Tue, 4 Oct 2022 00:45:09 -0700 Subject: [PATCH] Fixed a typo in the `map` function example --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5508155e..1f0576a3 100644 --- a/README.md +++ b/README.md @@ -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 (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/):