Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
作者声称下一个调用不是递归调用,但我不明白为什么。
资料来源:http ://courses.cms.caltech.edu/cs11/material/haskell/lectures/haskell_lecture_5.pdf
代码是递归的(它是根据自身定义的)。我相信@leftroundabout 关于强调功能的想法是准确的。下一张幻灯片说
do putY (y - x) gcdST
是
Recursive data definition * not recursive function call * like ones = 1 : ones
即没有递归函数调用,因为gdcST它不是函数(它不需要参数!)。这是一个递归数据定义。
gdcST