using Symata
Symata is similar to the Wolfram language. But, there are difference in notation and behavior.
[a,b,c]
Curly braces may also be used to enter lists in Symata. This may change in the future.
{a,b,c}
Elements in a list may be separated by commas, as above. But, in Symata they may also be separated by a newline after a complete expression.
[
a
c + d
"cat"
Expand((x+y)^2)
]
Function arguments are delimited by [ ]
in Mathematica. In Symata, arguments are delimited by ( )
f(x)
Map
, Apply
, Rule
, ReplaceAll
, etc.¶Map
f % list
f % [a,b,c]
Apply
x .% y
f .% g(1,2)
Rule
Rule
can be entered in the following ways.
[Rule(a,b), a => b , a ⇒ b]
RuleDelayed
[RuleDelayed(a,b), a .> b]
ReplaceAll
The short "infix" symbol for ReplaceAll
is ./
. In Mathematica, it is /.
.
Also note the parentheses surrounding the rule.
[a, x^2, b^3, (a+b)^3] ./ ( x_^n_ => g([n],x))