Telegram Group & Telegram Channel
Найдите средний элемент

В рамках этого Ката вам нужно создать функцию, которая, получив триплет, возвращает индекс числового элемента, находящегося между двумя другими элементами.

На вход функции будет подан массив из трех разных чисел (в Haskell: кортеж).

Например:


gimme([2, 3, 1]) => 0


2 - это число, которое находится между 1 и 3, а индекс 2 во входном массиве равен 0.

Другой пример (просто чтобы было понятно):


gimme([5, 10, 14]) => 1


10 - это число, которое находится между 5 и 14, а индекс 10 во входном массиве равен 1.

#7kyu

🔗 Перейти к задаче



tg-me.com/haskell_tg/6
Create:
Last Update:

Найдите средний элемент

В рамках этого Ката вам нужно создать функцию, которая, получив триплет, возвращает индекс числового элемента, находящегося между двумя другими элементами.

На вход функции будет подан массив из трех разных чисел (в Haskell: кортеж).

Например:


gimme([2, 3, 1]) => 0


2 - это число, которое находится между 1 и 3, а индекс 2 во входном массиве равен 0.

Другой пример (просто чтобы было понятно):


gimme([5, 10, 14]) => 1


10 - это число, которое находится между 5 и 14, а индекс 10 во входном массиве равен 1.

#7kyu

🔗 Перейти к задаче

BY Haskell




Share with your friend now:
tg-me.com/haskell_tg/6

View MORE
Open in Telegram


telegram Telegram | DID YOU KNOW?

Date: |

Telegram is riding high, adding tens of million of users this year. Now the bill is coming due.Telegram is one of the few significant social-media challengers to Facebook Inc., FB -1.90% on a trajectory toward one billion users active each month by the end of 2022, up from roughly 550 million today.

Telegram and Signal Havens for Right-Wing Extremists

Since the violent storming of Capitol Hill and subsequent ban of former U.S. President Donald Trump from Facebook and Twitter, the removal of Parler from Amazon’s servers, and the de-platforming of incendiary right-wing content, messaging services Telegram and Signal have seen a deluge of new users. In January alone, Telegram reported 90 million new accounts. Its founder, Pavel Durov, described this as “the largest digital migration in human history.” Signal reportedly doubled its user base to 40 million people and became the most downloaded app in 70 countries. The two services rely on encryption to protect the privacy of user communication, which has made them popular with protesters seeking to conceal their identities against repressive governments in places like Belarus, Hong Kong, and Iran. But the same encryption technology has also made them a favored communication tool for criminals and terrorist groups, including al Qaeda and the Islamic State.

telegram from vn


Telegram Haskell
FROM USA