Skip to content

Commit 69ab3c5

Browse files
committed
chore: rename apply to foo or bar in the macros, for clarity with the new to be added 'apply'
1 parent bd5e414 commit 69ab3c5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Macros.ark

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# (import std.Macros)
2020
# (-> "f0" f1) # equivalent to (f1 "f0")
2121
# (-> "f0" f1 f2 f3) # equivalent to (f3 (f2 (f1 "f0")))
22-
# (-> "f0" f1 (apply _ f2) (apply _ f3)) # equivalent to (apply (apply (f1 "f0") f2) f3)
22+
# (-> "f0" f1 (foo _ f2) (bar _ f3)) # equivalent to (bar (foo (f1 "f0") f2) f3)
2323
# =end
2424
# @author https://github.com/SuperFola
2525
(macro -> (arg fn1 ...fns) {

tests/macros-tests.ark

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
(+ data "-f2")))
88
(let f3 (fun (data)
99
(+ data "-f3")))
10-
(let apply (fun (data f)
10+
(let foo (fun (data f)
1111
(f data)))
1212

1313
(let test_func (fun (a b c) (* a b c)))
@@ -19,7 +19,7 @@
1919
(test:case "->" {
2020
(test:eq (-> "f0" f1) "f0-f1")
2121
(test:eq (-> "f0" f1 f2 f3) "f0-f1-f2-f3")
22-
(test:eq (-> "f0" f1 (apply _ f2) (apply _ f3)) "f0-f1-f2-f3") })
22+
(test:eq (-> "f0" f1 (foo _ f2) (foo _ f3)) "f0-f1-f2-f3") })
2323

2424
(test:case "partial & partial2" {
2525
(test:eq (test_func1 2 3) 6)

0 commit comments

Comments
 (0)