计算机科学 > 程序设计语言
[提交于 2012年2月14日]
标题:An Investigation of the Laws of Traversals
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:Traversals of data structures are ubiquitous in programming. Consequently, it is important to be able to characterise those structures that are traversable and understand their algebraic properties. Traversable functors have been characterised by McBride and Paterson as those equipped with a distributive law over arbitrary applicative functors; however, laws that fully capture the intuition behind traversals are missing. This article is an attempt to remedy this situation by proposing laws for characterising traversals that capture the intuition behind them. To support our claims, we prove that finitary containers are traversable in our sense and argue that elements in a traversable structure are visited exactly once.
提交历史
来自:EPTCS[v1] 2012年2月14日 星期二 03:01:31 UTC