Skip to content

Instantly share code, notes, and snippets.

@COMBORICO
COMBORICO / gist:7c44386158cb27569c138ad482761b30
Last active April 17, 2018 19:26
Common Lisp compared to Perl6: converts seconds into years months days hours minutes seconds
===========================PERL 6======================
seconds;
sub seconds
{
say "Please enter number of seconds: ";
my $raw = get.Int;
my $sec = $raw;
@COMBORICO
COMBORICO / gist:dc9d458e524060763519d0a1e45fcfa1
Last active May 20, 2018 11:58
Missing closing quote (Line 8) not caught, instead causes "=begin comment" to be ignored; also block can be not closed (line 9) and it won't be caught, either.
days-HMS( 61 );
sub days-HMS (Int $seconds )
{
my $minutes = $seconds div 60;
my $sec-left = $seconds mod 60;
say "$minutes $sec-left;
=begin comment