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

Commit0b6e5a6

Browse files
committed
revert CLJS-3420
1 parent105d3fe commit0b6e5a6

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

‎src/main/cljs/cljs/core.cljs

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3503,7 +3503,6 @@ reduces them without incurring seq initialization"
35033503
:else name)]
35043504
(Keyword.ns name (str (whenns (strns"/")) name)nil))))
35053505

3506-
35073506
(deftypeLazySeq [meta ^:mutablefn ^:mutable s ^:mutable __hash]
35083507
Object
35093508
(toString [coll]
@@ -3514,10 +3513,7 @@ reduces them without incurring seq initialization"
35143513
(if (nil?fn)
35153514
s
35163515
(do
3517-
(loop [ls (fn)]
3518-
(if (instance? LazySeq ls)
3519-
(recur (.sval ls))
3520-
(set! s (seq ls))))
3516+
(set! s (fn))
35213517
(set!fnnil)
35223518
s)))
35233519
(indexOf [coll x]
@@ -3537,27 +3533,27 @@ reduces them without incurring seq initialization"
35373533
(-with-meta [coll new-meta]
35383534
(if (identical? new-meta meta)
35393535
coll
3540-
(LazySeq. new-meta #(.sval coll)nil __hash)))
3536+
(LazySeq. new-meta #(-seq coll)nil __hash)))
35413537

35423538
IMeta
35433539
(-meta [coll] meta)
35443540

35453541
ISeq
35463542
(-first [coll]
3547-
(.sval coll)
3543+
(-seq coll)
35483544
(when-not (nil? s)
3549-
(-first s)))
3545+
(first s)))
35503546
(-rest [coll]
3551-
(.sval coll)
3547+
(-seq coll)
35523548
(if-not (nil? s)
3553-
(-rest s)
3549+
(rest s)
35543550
()))
35553551

35563552
INext
35573553
(-next [coll]
3558-
(.sval coll)
3554+
(-seq coll)
35593555
(when-not (nil? s)
3560-
(-next s)))
3556+
(next s)))
35613557

35623558
ICollection
35633559
(-conj [coll o] (cons o coll))
@@ -3573,7 +3569,14 @@ reduces them without incurring seq initialization"
35733569
(-hash [coll] (caching-hash coll hash-ordered-coll __hash))
35743570

35753571
ISeqable
3576-
(-seq [coll] (.sval coll))
3572+
(-seq [coll]
3573+
(.sval coll)
3574+
(when-not (nil? s)
3575+
(loop [ls s]
3576+
(if (instance? LazySeq ls)
3577+
(recur (.sval ls))
3578+
(do (set! s ls)
3579+
(seq s))))))
35773580

35783581
IReduce
35793582
(-reduce [coll f] (seq-reduce f coll))

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp