head-skip-tail

provide sub versions of .head|skip|tail

NAME

head-skip-tail - provide sub versions of .head|skip|tail

SYNOPSIS

use head-skip-tail;

my @a = ^10;
say head(  4, @a);  # (0 1 2 3)
say head(*-4, @a);  # (0 1 2 3 4 5)

say skip(  4, @a);  # (4 5 6 7 8 9)
say skip(*-4, @a);  # (6 7 8 9)

say tail(  4, @a);  # (6 7 8 9)
say tail(*-4, @a);  # (4 5 6 7 8 9)

DESCRIPTION

This distribution provides sub versions of the .head, .skip and .tail methods on versions of Raku that do not support this in core.

If these subroutines are supported in core, then using this module becomes a no-op.

AUTHOR

Elizabeth Mattijsen [email protected]

Source can be located at: https://github.com/lizmat/head-skip-tail . Comments and Pull Requests are welcome.

If you like this module, or what Iā€™m doing more generally, committing to a small sponsorship would mean a great deal to me!

COPYRIGHT AND LICENSE

Copyright 2022 Elizabeth Mattijsen

This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.

head-skip-tail v0.0.1

provide sub versions of .head|skip|tail

Authors

  • Elizabeth Mattijsen

License

Artistic-2.0

Dependencies

Test Dependencies

Provides

  • head-skip-tail

Documentation

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.