-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Hi,
In the quick-haskell-syntax post, in the paragraph where you explained map addToThree function, the comments are wrong.
Current Code:
map addToThree [1, 8, 17] -- [4, 11, 20]
-- (addToThree 1) : (map addToThree [4, 5])
-- 4 : (addToThree 8) : (map addToThree [5])
-- 4 : 11 : (addToThree 5) : (map addToThree [])
-- 4 : 11 : 20 : []
-- 4 : 11 : [20]
-- 4 : [11, 20]
-- [4, 11, 20]
Should be:
map addToThree [1, 8, 17] -- [4, 11, 20]
-- (addToThree 1) : (map addToThree [8, 17])
-- 4 : (addToThree 8) : (map addToThree [17])
-- 4 : 11 : (addToThree 17) : (map addToThree [])
-- 4 : 11 : 20 : []
-- 4 : 11 : [20]
-- 4 : [11, 20]
-- [4, 11, 20]
Metadata
Metadata
Assignees
Labels
No labels