- or download this
^f(x) ::= x f(x)
- or download this
0 - f(x)
1 - x f(x)
2 - x x f(x)
3 - x x x f(x)
...
- or download this
^g(x) ::= x x
- or download this
g(f(x))
- or download this
0 - g(f(x))
1 - f(x) f(x)
2 - x f(x) x f(x)
3 - x x f(x) x x f(x)
...
- or download this
my $x = 3;
my $y = 3;
...
if (3 == $y) { # substitutability fails
print "$x equals $y.\n";
}
- or download this
my $x = 3; # start frame of reference for variable $x
# start frame of reference for value $x==3
...
# end frame of reference for variable $x
# end frame of reference for value $y==3
# end frame of reference for variable $y
- or download this
p1 ::= 'the morning star' equals 'the planet venus'
p2 ::= 'the evening star' equals 'the planet venus'
...
the same thing, equal each other'
=> ::= an operator which means 'this rule produces this result'
- or download this
p1 (+) p2 => p3
p1 (+) p3 => p2
p2 (+) p3 => p1
- or download this
j1 ::= john knows 'the morning star' equals 'the planet venus'
j2 ::= john knows 'the evening star' equals 'the planet venus'
j3 ::= john knows 'the morning star' equals 'the evening star'
- or download this
j1 (+) p2 => j3
p1 (+) j2 => j3
...
p1 (+) j3 => j2
j2 (+) p3 => j1
p2 (+) j3 => j1
- or download this
sub outer_1 {
local ($x) = 1;
...
my $y = shift;
return ($x + $y);
}
- or download this
sub equals {
my ($str, $num) = @_;
...
return 0;
}
}
- or download this
my $inc = sub { return ($_[0] + 1) };
my $dec = sub { return ($_[0] - 1) };
...
----
output == '0 1 2 3 2 3 2 1 2 0 1 2 3'
- or download this
sub apply {
my ($val, $func, @etc) = @_;
...
return ($func->($val));
}
}
- or download this
my @x = ($inc, $inc, $inc);
my @y = ($inc, $inc, $inc);
...
printf "%d equals %d.\n", counter (@x), counter (@y);
}
}