Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
nemetroid
on March 26, 2014
|
parent
|
context
|
favorite
| on:
What it's like to use Haskell
Note that the argument, the list to be sorted, is pattern matched as
(p:xs)
which means that p is the first element of the list, and xs is the rest of the elements (i.e., xs does not contain p). In the definition of "greater":
greater = filter (>= p) xs
, the filter is applied to xs, which means that p will not be included.
AnimalMuppet
on March 26, 2014
[–]
Ah, I see. Thanks!
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: