Skip to content

Commit 07fd639

Browse files
committed
core: Use + for partial and * for comp
1 parent 577319d commit 07fd639

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

core/src/ys/std.clj

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -350,10 +350,7 @@
350350
char? (if (number? y)
351351
(char (+ (int x) y))
352352
(str x y))
353-
fn? (cond
354-
(fn? y) (comp y x)
355-
(sequential? y) (apply partial x y)
356-
:else (partial x y))
353+
fn? (partial x y)
357354
nil? (util/die "Can't add+ to a nil value")
358355
seqable? (concat (to-list x)
359356
(if (sequential? y)
@@ -375,6 +372,7 @@
375372
(and (number? x) (vector? y)) (vec (apply concat (repeat x y)))
376373
(and (sequential? x) (number? y)) (apply concat (repeat y x))
377374
(and (number? x) (sequential? y)) (apply concat (repeat x y))
375+
(fn? x) (comp y x)
378376
(nil? x) (util/die "Can't mul+ to a nil value")
379377
:else (* (to-num x 1) (to-num y 1))))
380378

0 commit comments

Comments
 (0)