10.
IEnumerable<int>
FilterAndSort(IEnumerable<int>
numbers)
{
var
evens
=
new
List<int>();
foreach
(var
i
in
numbers)
{
if
(i
%
2
==
0)
{
evens.Add(i);
}
}
evens.Sort();
return
evens;
}
19.
IEnumerable<int>
FilterAndSort(IEnumerable<int>
numbers)
{
var
evens
=
new
List<int>();
foreach
(var
i
in
numbers)
{
if
(i
%
2
==
0)
{
evens.Add(i);
}
}
evens.Sort();
return
evens;
}
40. “If
you
love
wri;ng
code
-‐-‐
really,
truly
love
to
write
code
-‐-‐
you'll
love
it
enough
to
write
as
liEle
of
it
as
possible.”
Jeff
Atwood
41. “Code
is
bad.
It
rots.
It
requires
periodic
maintenance.
It
has
bugs
that
need
to
be
found.
New
features
mean
old
code
has
to
be
adapted.”
Rich
Skrenta
44. “Typically
the
main
func;on
is
defined
in
terms
of
other
func;ons,
which
in
turn
are
defined
in
terms
of
s;ll
more
func;ons,
un;l
at
the
boEom
level
the
func;ons
are
language
primi;ves.”
John
Hughes
–
“Why
Func;onal
Programming
MaEers”
60.
IEnumerable<int>
FilterAndSort(IEnumerable<int>
numbers)
{
var
evens
=
new
List<int>();
foreach
(var
i
in
numbers)
{
if
(i
%
2
==
0)
{
evens.Add(i);
}
}
evens.Sort();
return
evens;
}