File tree Expand file tree Collapse file tree 2 files changed +17
-8
lines changed Expand file tree Collapse file tree 2 files changed +17
-8
lines changed Original file line number Diff line number Diff line change 38
38
*** Written in Clojure and itself
39
39
** Clojure on Closure
40
40
*** Google's JS toolkit
41
- * Clojure[Script] in Clojure
42
- * Google Closure
41
+ ** Clojure[Script] in Clojure
42
+ ** Google Closure
43
43
** some subset of my gclosure lightning talk
44
- * Demo
45
- ** REPL
46
- ** Compilation
47
- ** Web app
48
- ** CLI app?
49
44
* Where we are at
50
45
** What's there?
51
46
*** Compiler
52
47
*** REPL
53
- *** All the primitives
48
+ *** All the primitives (that make sense)
54
49
*** Arity overloading
55
50
*** Macros
56
51
*** Seqs, maps, vectors, sets
121
116
*** all with Clojure CAs welcome to participate
122
117
** The Friday invite
123
118
** The Conj
119
+ * Demo
120
+ ** REPL
121
+ ** Compilation
122
+ ** Web app
123
+ ** CLI app?
124
+ * Q & A
125
+
124
126
Original file line number Diff line number Diff line change @@ -1558,6 +1558,13 @@ reduces them without incurring seq initialization"
1558
1558
" Returns a lazy seq of n xs."
1559
1559
[n x] (take n (repeat x)))
1560
1560
1561
+ (defn repeatedly
1562
+ " Takes a function of no args, presumably with side effects, and
1563
+ returns an infinite (or length n if supplied) lazy sequence of calls
1564
+ to it"
1565
+ ([f] (lazy-seq (cons (f ) (repeatedly f))))
1566
+ ([n f] (take n (repeatedly f))))
1567
+
1561
1568
(defn iterate
1562
1569
" Returns a lazy sequence of x, (f x), (f (f x)) etc. f must be free of side-effects"
1563
1570
{:added " 1.0" }
You can’t perform that action at this time.
0 commit comments