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.
我有两个定义ones/0,都导致一个无限的列表:
ones/0
ones = 1 : ones ones = repeat 1 repeat::a->[a] repeat x = x : repeat x
我被告知第一个是循环结构,而第二个不是。真的吗?这实际上意味着什么/我如何判断一个结构是否是循环的?