From d3b3a6ffa0328840c52475cd4b16c444118732a5 Mon Sep 17 00:00:00 2001 From: elfacu0 <30785449+elfacu0@users.noreply.github.com> Date: Fri, 25 Mar 2022 09:38:34 -0600 Subject: [PATCH] Change semicolon position to match other examples Similar cases in documentation start with ";[", as code style suggests --- readme.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/readme.md b/readme.md index d34eee6..e272810 100644 --- a/readme.md +++ b/readme.md @@ -423,9 +423,9 @@ john.age + five === ({name: 'John', age: 30}).age + (5) A [curried](#currying) function that ignores its second argument: ```js -const constant = a => () => a; +const constant = a => () => a -[1, 2].map(constant(0)) // => [0, 0] +;[1, 2].map(constant(0)) // => [0, 0] ``` ### Constant Functor @@ -1043,9 +1043,9 @@ A **function** `f :: A => B` is an expression - often called arrow or lambda exp ```js // times2 :: Number -> Number -const times2 = n => n * 2; +const times2 = n => n * 2 -[1, 2, 3].map(times2) // [2, 4, 6] +;[1, 2, 3].map(times2) // [2, 4, 6] ``` ## Partial function