mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 17:41:41 +00:00
fix #2295
This commit is contained in:
parent
df4dbee36f
commit
a7eed36c1d
@ -156,6 +156,7 @@ List.map (\a -> a * 2) [1..4] -- [2, 4, 6, 8]
|
||||
|
||||
-- You can pattern match in function definitions when there's only one case.
|
||||
-- This function takes one tuple rather than two arguments.
|
||||
-- This is the way you'll usually unpack/extract values from tuples.
|
||||
area (width, height) =
|
||||
width * height
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user