在编写代码时应尽量避免嵌套循环,目前大多数代码都是使用了哈希表、简单链表和单循环。
Your code should (almost) never have multiple nested loops (a loop inside a loop inside a loop). Most of the code written today should use Hashtables, simple lists and singly nested loops.
理论上,哈希表是一个非常简单的构造,就是数组或链表的集合被划分到有限数量的存储体中。
In theory the hash table is a rather simple construct, just collection of arrays or linked lists divided into a finite number of buckets.
一开始看来,用这种方法表示一个空链表使代码简单。
It may at first appear that representing empty lists in this way makes the code simpler.
持久化基本链表数据结构是最简单的;在这里,Clojure中的一个列表绑定到一个名为“a”的变量。
Making a basic linked-list data structure persistent is the easiest exercise; here, a list in Clojure is bound to a var named "a".
有时简单的生成器可以用简洁的方式调用,就像不带中括号的链表推导式。
Some simple generators can be coded succinctly as expressions using a syntax similar to list comprehensions but with parentheses instead of brackets.
有时简单的生成器可以用简洁的方式调用,就像不带中括号的链表推导式。
Some simple generators can be coded succinctly as expressions using a syntax similar to list comprehensions but with parentheses instead of brackets.
应用推荐