Fork me on GitHub
#meander
<
2022-01-08
>
geoff02:01:36

Hi, is it possible to call a function in r/rewrite?

geoff02:01:05

(r/rewrite (foo & ?x) (apply fn-to-be-called ?x))

geoff02:01:38

where the result of fn-to-be-called will be substituted in, rather than just the list of symbols (apply fn-to-be-called ?x) with the ?x substituted

geoff02:01:43

nevermind, looks like defsyntax does exactly what I wanted

geoff02:01:49

thanks for working on this library

jimmy02:01:27

m/app lets you call functions

🙌 1
jimmy03:01:11

Or I guess in your case r/app

geoff03:01:54

how would I apply that in the above case?

geoff03:01:12

(r/rewrite (foo & ?x) (m/app fn-to-be-called ?x))

geoff03:01:58

ah got it, thanks