This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use 5.010; | |
use utf8; | |
use bignum; | |
use Marpa::R2; | |
my $grammar = Marpa::R2::Scanless::G->new( | |
{ bless_package => 'My_Nodes', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 5 | |
"hello" | |
(DEFINE A 5) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(DEFINE * 5) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use 5.018; | |
use utf8; | |
local $| = 1; | |
for my $i (map { chr($_) } 32 .. 127) { | |
if ($i =~ /\p{Magic::Wow}+/) { | |
print $i; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Gaussian; | |
use overload '0+' => 'generate'; | |
use operator '+/-' => { code => 'new', assoc => 'left', prio => 1 }; | |
sub new { | |
my ($class, $n, $sd3) = @_; | |
bless [ $n, $sd3 / 3 ] => $class; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function cons(a, b) { | |
return function (n) { | |
return n == 1 ? a : b; | |
} | |
} | |
function car(l) { | |
return l(1); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package cons; | |
use Exporter qw( import ); | |
our @EXPORT = qw( cons car cdr ); | |
sub cons { | |
my ($x, $y) = @_; | |
return sub { | |
my ($n) = @_; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package cons; | |
# Package for taking two "things", joining them together into a "pair", and accessing each "half" of the pair | |
use Exporter qw( import ); | |
our @EXPORT = qw( cons car cdr ); | |
sub cons { | |
# Takes two things and returns a pair |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use App::traffsim; | |
App::traffsim->run(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package delta; | |
use 5.012; | |
use Exporter qw( import ); | |
our @EXPORT = qw( delta ); | |
sub delta ($); |
OlderNewer