我遇到了Rebol,我对此很纳闷。
我从这里遇到以下脚本:
use [feed questions answers][
feed: load-xml/dom http://stackoverflow.com/feeds/tag/rebol
questions: map-each entry feed/get-by-tag <entry> [
find/match entry/get <id> "http://stackoverflow.com/q/"
]
answers: make block! length? questions
foreach question questions [
question: load-xml/dom join http://stackoverflow.com/feeds/question/ question
foreach entry next question/get-by-tag <entry> [append answers entry/tree]
]
insert clear feed/find-element <entry> answers
feed/flatten
]
所有的集合操作操作都使map-each
我想起了JavaScript和C#,它们都具有功能。
Rebol是功能语言吗?它支持函数式编程吗?它将分类为纯功能语言(PFL)吗?