mirror of
https://github.com/carp-lang/Carp.git
synced 2024-09-11 05:25:28 +03:00
Cleanup partition refactor
Remove an unnecessary let clause.
This commit is contained in:
parent
d3f99487db
commit
6d1ddf41cf
@ -377,7 +377,6 @@ It will create a copy. If you want to avoid that, consider using [`endo-filter`]
|
||||
```")
|
||||
(sig partition (Fn [(Ref (Array a) b) Int] (Array (Array a))))
|
||||
(defn partition [arr n]
|
||||
(let [len (+ (mod (Array.length arr) n) (/ (Array.length arr) n))]
|
||||
(let-do [x 0
|
||||
y 0
|
||||
a []]
|
||||
@ -390,5 +389,5 @@ It will create a copy. If you want to avoid that, consider using [`endo-filter`]
|
||||
(set! y (Array.length arr)))
|
||||
(set! a (push-back a (Array.slice arr x y)))
|
||||
(set! x y)))
|
||||
a)))
|
||||
a))
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user