计算机科学 > 程序设计语言
[提交于 2021年1月27日]
标题:Deriving monadic quicksort (Declarative Pearl)
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:To demonstrate derivation of monadic programs, we present a specification of sorting using the non-determinism monad, and derive pure quicksort on lists and state-monadic quicksort on arrays. In the derivation one may switch between point-free and pointwise styles, and deploy techniques familiar to functional programmers such as pattern matching and induction on structures or on sizes. Derivation of stateful programs resembles reasoning backwards from the postcondition.
提交历史
来自:Shin-Cheng Mu[v1] 2021年1月27日 星期三 14:15:46 UTC