NPL (编程语言)

NPL是具有模式匹配函数式编程语言,由爱丁堡大学Rod Burstall和John Darlington在1977年设计。这个语言允许特定集合和逻辑构造符出现在定义的右手侧,比如:

 setofeven(X) <= <:x: x in X & even(x) :>
NPL
函数式
設計者Rod Burstall, John Darlington
1977年1977
啟發語言
ISWIM, Lisp 1.5
影響語言
Hope

NPL解释器从左至右对这个列表生成器进行求值,所以条件可以提及任何出现在其左侧的约束(bound)变量。这叫做集合建构。NPL最终演化为Hope但丢弃了集合建构,它以列表推导式的形式重现出来在后来的函数式编程语言中。

引用

  • John Darlington (1977). "Program Transformation and Synthesis: Present Capabilities". Research Report No. 77/43, Dept. of Computing and Control, Imperial College of Science and Technology, London.

本條目部分或全部内容出自以GFDL授權發佈的《自由線上電腦詞典》(FOLDOC)。

This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.