Active object: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) (→{{header|Perl 6}}: Add a Perl 6 example) |
Thundergnat (talk | contribs) m (→{{header|Perl 6}}: use full (non-simplified ) function for sine) |
||
Line 1,668: | Line 1,668: | ||
my $a = Integrator.new; |
my $a = Integrator.new; |
||
$a.Input( sub ($t) {sin( |
$a.Input( sub ($t) { sin(2 * π * .5 * $t) } ); |
||
say "Initial value: ", $a.Output; |
say "Initial value: ", $a.Output; |