Seasoned Schemer一书中,第12页的scramble函数,描述是什么意思?
函数描述:
The function scramble takes a non-empty tup in which no number is greater than its own index, and returns a tup of the same lenght. Each number is the argument is treated as a backward index from its own position to a point earlier in the tup. The result at each position is found by counting backward from the current position according to this index.
What's the value of (scramble tup) where tup is (1 1 1 3 4 2 1 1 9 2)
Answer: (1 1 1 1 1 4 1 1 1 9)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论