AZ
var
l: TList<TPerson>;
begin
l.Sort(
lambda (aLeft, aRight) as aLeft.Age < aRight.Age
);
end.
В паскале даже лямбды есть
Size: a a a
AZ
var
l: TList<TPerson>;
begin
l.Sort(
lambda (aLeft, aRight) as aLeft.Age < aRight.Age
);
end.
AZ
AL
EG
ap
— спасибо, очень понятно сходу, что это делает. Традиция использовать однобуквенные переменные не помогает.AZ
class (Eq a, Show a) => Num a where
(+), (-), (*) :: a -> a -> a
negate :: a -> a
abs, signum :: a -> a
fromInteger :: Integer -> a
-- Minimal complete definition:
-- All, except negate or (-)
x - y = x + negate y
negate x = 0 - x
G
ap
— спасибо, очень понятно сходу, что это делает. Традиция использовать однобуквенные переменные не помогает.AZ
EG
class (Eq a, Show a) => Num a where
(+), (-), (*) :: a -> a -> a
negate :: a -> a
abs, signum :: a -> a
fromInteger :: Integer -> a
-- Minimal complete definition:
-- All, except negate or (-)
x - y = x + negate y
negate x = 0 - x
EG
EG
AL
class (Eq a, Show a) => Num a where
(+), (-), (*) :: a -> a -> a
negate :: a -> a
abs, signum :: a -> a
fromInteger :: Integer -> a
-- Minimal complete definition:
-- All, except negate or (-)
x - y = x + negate y
negate x = 0 - x
AZ
AZ
AZ
AZ
EG
class (Eq a, Show a) => Num a where
(+), (-), (*) :: a -> a -> a
negate :: a -> a
abs, signum :: a -> a
fromInteger :: Integer -> a
-- Minimal complete definition:
-- All, except negate or (-)
x - y = x + negate y
negate x = 0 - x
AZ
AL
EG