-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added the prefix
...
operator which represents unimplemented code…
…. (same as in perl>=5.12.0) - UNIVERSAL::AUTOLOAD is a little bit faster now and produces nicer error messages. - Updated the .pod files.
- Loading branch information
trizen
committed
Dec 6, 2015
1 parent
423f190
commit b1604b3
Showing
20 changed files
with
261 additions
and
13 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package Sidef::Meta::Unimplemented { | ||
|
||
sub new { | ||
my (undef, %opt) = @_; | ||
bless \%opt, __PACKAGE__; | ||
} | ||
}; | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
=encoding utf8 | ||
|
||
=head1 NAME | ||
|
||
Sidef::Meta::Unimplemented | ||
|
||
=head1 DESCRIPTION | ||
|
||
This object is ... | ||
|
||
=head1 SYNOPSIS | ||
|
||
var obj = Unimplemented.new(...); | ||
|
||
=head1 METHODS | ||
|
||
|
||
=head2 new | ||
|
||
Unimplemented.new() -> I<Obj> | ||
|
||
Return the | ||
|
||
=cut |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
=encoding utf8 | ||
|
||
=head1 NAME | ||
|
||
Sidef::Types::Block::Case | ||
|
||
=head1 DESCRIPTION | ||
|
||
This object is ... | ||
|
||
=head1 SYNOPSIS | ||
|
||
var obj = Case.new(...); | ||
|
||
=head1 METHODS | ||
|
||
|
||
=head2 new | ||
|
||
Case.new() -> I<Obj> | ||
|
||
Return the | ||
|
||
=cut |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -624,6 +624,8 @@ Complex.polars() -> I<Obj> | |
|
||
Return the | ||
|
||
Aliases: I<polar_parts> | ||
|
||
=cut | ||
|
||
=head2 rand | ||
|
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/ruby | ||
|
||
# | ||
## http://rosettacode.org/wiki/Count_the_coins | ||
# | ||
|
||
func cc(_) { 0 } | ||
func cc({ .is_neg }, *_) { 0 } | ||
func cc({ .is_zero }, *_) { 1 } | ||
|
||
func cc(amount, first, *rest) is cached { | ||
cc(amount, rest...) + cc(amount - first, first, rest...); | ||
} | ||
|
||
func cc_optimized(amount, *rest) { | ||
cc(amount, rest.sort_by{|v| -v }...); | ||
} | ||
|
||
var x = cc_optimized(100, 1, 5, 10, 25); | ||
say "Ways to change $1 with common coins: #{x}"; | ||
|
||
assert_eq(x, 242); |
Oops, something went wrong.