Currently I am studying Mathematica programming, and when I study pattern matching and replacement, I find it is quite similar to functions. So can we say "all functions in Mathematica are some kind of pattern-matching-and-replacement procedures"?
Asked
Active
Viewed 106 times
0
1 Answers
0
I wouldn't say all functions. For example, consider
f = Compile[{{x, _Real}}, x*x]
There aren't any replacement rules for f in this case.
DownValues[f]
(* {} *)
rhennigan
- 1,783
- 10
- 19
DownValuesin the docs. – Michael E2 Apr 17 '15 at 01:44