Last active
February 26, 2025 05:52
-
-
Save yamnikov-oleg/b1a3d85051f92099638e8e94e48e821e to your computer and use it in GitHub Desktop.
Flutter: Separate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ЗАДАНИЕ: | |
// Напишите функцию separate, которая вставляет новые элементы в Iterable | |
// некоторого произвольного типа. | |
// Новые элементы добавляются между каждой парой существующих элементов. | |
// separate должна возвращать Iterable того же типа. | |
// | |
// Например: | |
// separate([1, 2, 3], (a, b) => 0) // => [1, 0, 2, 0, 3] | |
// separate(["x", "y", "z"], (a, b) => a + b) // => ["x", "xy", "y", "yz", "z"] | |
// | |
// Максимально покройте функцию юнит-тестами. | |
import 'package:flutter_test/flutter_test.dart'; | |
// ??? separate(???) { | |
// throw UnimplementedError(); | |
// } | |
void main() { | |
test("...", () {}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment