Добавил:
Tushkan
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз:
Предмет:
Файл:Готовые лабораторные работы / 1 / 11
.hs f11 x = if x == 1 then False
else f11_1 (x-1) x
f11_1 c x = if c == 1 then True
else if f11_2 c x then False
else f11_1 (c-1) x;
f9 a b = if (a == 1) then 1
else if (b == 1) then 1
else if (a == b) then a
else if (b > a) then f9 (b-a) a
else f9 (a-b) b
f11_2 a b = if f9 a b == 1 then False
else True
else f11_1 (x-1) x
f11_1 c x = if c == 1 then True
else if f11_2 c x then False
else f11_1 (c-1) x;
f9 a b = if (a == 1) then 1
else if (b == 1) then 1
else if (a == b) then a
else if (b > a) then f9 (b-a) a
else f9 (a-b) b
f11_2 a b = if f9 a b == 1 then False
else True