|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Меню:
Главная
Форум
Литература: Программирование и ремонт Импульсные блоки питания Неисправности и замена Радиоэлектронная аппаратура Микросхема в ТА Рубрикатор ТА Кабельные линии Обмотки и изоляция Радиоаппаратура Гибкие диски часть 2 часть 3 часть 4 часть 5 Ремонт компьютера часть 2 Аналитика: Монтаж Справочник Электроника Мощные высокочастотные транзисторы 200 микросхем Полупроводники ч.1 Часть 2 Алгоритмические проблемы 500 микросхем 500 микросхем Сортировка и поиск Монады Передача сигнала Электроника Прием сигнала Телевидиние Проектирование Эвм Оптимизация Автомобильная электроника Поляковтрансиверы Форт Тензодатчик Силовые полевые транзисторы Распределение частот Резисторные и термопарные Оберон Открытые системы шифрования Удк |
[24] The example code shows the use of the filterM function within a do-block. It prints the subset of its arguments that specify directories and ignores non-directory arguments. Example 6 This example is discussed in the section: Monad support in Haskell. The example code shows the use of the liftM function within a do-block. It looks up a name in a list and uses a lifted String manipulation function to modify it within the Maybe monad. Example 7 This example is discussed in the section: Monad support in Haskell. The example code shows a higher-order application of liftM2. It folds lifted operations within the List monad to produce lists of all combinations of elements combined with the lifted operator. Example 8 This example is discussed in the section: Monad support in Haskell. The example code shows a higher-order application of ap. It folds ap through a list of Maybe (a->a) functions to process sequences of commands. Example 9 This example is discussed in the section: Monad support in Haskell. The example code shows the use of msum in the Maybe monad to select the first variable match in a stack of binding environments. Example 10 This example is discussed in the section: Monad support in Haskell. The example code shows the use of guard in the Maybe monad to select only the records from a list that satisfy a predicate (equivalent to filter).
Example 11 This example is discussed in the section: The Maybe monad.
Example 12 This example is discussed in the section: The Error monad. The example code demonstrates the use of the Either type constructor as an Error monad with a custom error type. The example parses hexadecimal digits and uses the exception handling mechanism of the Error monad to provide informative error messages in the event of a parse failure. Example 13 This example is discussed in the section: The List monad. The example code uses the built-in list type constructor as a monad for non-deterministic computation. The example demonstrates parsing an ambiguous grammar consisting of integers, hex values, and words. Example 14 This example is discussed in the section: The IO monad. The example code implements a simple version of the standard Unix command "tr". The example demonstrates use of the IO monad including implicit fail calls due to pattern matching failures and the use of catcherror. Example 15 This example is discussed in the section: The State monad. The example code shows how the State monad can be used instead of explicitly passing state. The example uses the State monad to manage the random number generator state while building a compound data value requiring multiple calls to the random number generator.
Example 16 This example is discussed in the section: The Reader monad. The example code shows how the Reader monad can be used to simplify computations involving a shared environment. The example uses the Reader monad to implement a simple template substitution system. The example code demonstrates the use of the Parsec monadic parser combinator library. Example 17 This example is discussed in the section: The Writer monad. The example code shows how the Writer monad can be used to implement logging. The example implements a very simple firewall simulator and uses the Writer monad to log the firewall activity. Example 18 This example is discussed in the section: The Continuation monad. The example code shows how the Continuation monads escape continuations work. The example computes a complex transformation of a number. Example 19 This example is discussed in the section: Combining monads the hard way. The example code shows how the Continuation monad can be nested within the IO monad given a suitable computational structure. The example is a slight modification of example 18. Example 20 This example is discussed in the section: Combining monads the hard way. The example code shows how the Continuation monad and IO monad can be used simultaneously, but without using monad transformers. The example builds on examples 18 and 19. Example 21 This example is discussed in the section: Monad transformers.
|
Среды: Smalltalk80 MicroCap Local bus Bios Pci 12С ML Микроконтроллеры: Atmel Intel Holtek AVR MSP430 Microchip Книги: Емкостный датчик 500 схем для радиолюбителей часть 2 (4) Структура компьютерных программ Автоматическая коммутация Кондиционирование и вентиляция Ошибки при монтаже Схемы звуковоспроизведения Дроссели для питания Блоки питания Детекторы перемещения Теория электропривода Адаптивное управление Измерение параметров Печатная плата pcad pcb Физика цвета Управлении софтверными проектами Математический аппарат Битовые строки Микроконтроллер nios Команды управления выполнением программы Перехода от ahdl к vhdl Холодный спай Усилители hi-fi Электронные часы Сердечники из распылённого железа Анализ алгоритмов 8-разрядные КМОП Классификация МПК История Устройства автоматики Системы и сети Частотность Справочник микросхем Вторичного электропитания Типы видеомониторов Радиобиблиотека Электронные системы Бесконтекстный язык Управление техническими системами Монтаж печатных плат Работа с коммуникациями Создание библиотечного компонента Нейрокомпьютерная техника Parser Пи-регулятор ч.1 ПИ-регулятор ч.2 Обработка списков Интегральные схемы Шина ISAВ Шина PCI Прикладная криптография Нетематическое: Взрывной автогидролиз Нечеткая логика Бытовые установки (укр) Автоматизация проектирования Сбор и защита Дискретная математика Kb радиостанция Энергетика Ретро: Прием в автомобиле Управление шаговым двигателем Магнитная запись Ремонт микроволновки Дискретные системы часть 2 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||