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: |

The STAR Market, as is implied by the name, is heavily geared toward smaller innovative tech companies, in particular those engaged in strategically important fields, such as biopharmaceuticals, 5G technology, semiconductors, and new energy. The STAR Market currently has 340 listed securities. The STAR Market is seen as important for China’s high-tech and emerging industries, providing a space for smaller companies to raise capital in China. This is especially significant for technology companies that may be viewed with suspicion on overseas stock exchanges.

To pay the bills, Mr. Durov is issuing investors $1 billion to $1.5 billion of company debt, with the promise of discounted equity if the company eventually goes public, the people briefed on the plans said. He has also announced plans to start selling ads in public Telegram channels as soon as later this year, as well as offering other premium services for businesses and users.

telegram from cn


Telegram Haskell
FROM USA