Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7974120

Browse files
committed
Use an explicit function argument foriterate
Also replace :hello with "hello" to avoid potential confusion since:hello is also a function.refs#75
1 parente74a266 commit7974120

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

‎resources/koans.clj‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
[01234]
128128
10
129129
95
130-
(range20)
130+
[1248163264128]
131131
:a]
132132
"___" [(fn [x] x)]}]
133133

‎src/koans/11_lazy_sequences.clj‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717
(drop __ (range100)))
1818

1919
"Iteration provides an infinite lazy sequence"
20-
(= __ (take20 (iterateinc0)))
20+
(= __ (take8 (iterate(fn [x] (* x2))1)))
2121

2222
"Repetition is key"
2323
(= [:a:a:a:a:a:a:a:a:a:a]
2424
(repeat10 __))
2525

2626
"Iteration can be used for repetition"
27-
(= (repeat100:hello)
28-
(take100 (iterate ___:hello))))
27+
(= (repeat100"hello")
28+
(take100 (iterate ___"hello"))))

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp