mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-04-27 07:33:57 +00:00
moved comment on sndOfTriple
This commit is contained in:
parent
8c30522d58
commit
093e6b62a1
@ -162,8 +162,8 @@ fib 1 = 1
|
|||||||
fib 2 = 2
|
fib 2 = 2
|
||||||
fib x = fib (x - 1) + fib (x - 2)
|
fib x = fib (x - 1) + fib (x - 2)
|
||||||
|
|
||||||
-- Pattern matching on tuples, using wild card (_) to bypass naming an unused value
|
-- Pattern matching on tuples
|
||||||
sndOfTriple (_, y, _) = y
|
sndOfTriple (_, y, _) = y -- you can use a wild card (_) to bypass naming an unused value
|
||||||
|
|
||||||
-- Pattern matching on lists. Here `x` is the first element
|
-- Pattern matching on lists. Here `x` is the first element
|
||||||
-- in the list, and `xs` is the rest of the list. We can write
|
-- in the list, and `xs` is the rest of the list. We can write
|
||||||
|
Loading…
Reference in New Issue
Block a user