Skip to content

Instantly share code, notes, and snippets.

@sergot
Last active December 17, 2015 18:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sergot/5652184 to your computer and use it in GitHub Desktop.
Save sergot/5652184 to your computer and use it in GitHub Desktop.
Removes string $b from string $a
use v6;
multi sub infix:<->(Str $a, Str $b) {
nqp::join('', nqp::split($b, $a));
}
say 'a b c' - ' ' - 'a';
say 5 - 2;
@sergot
Copy link
Author

sergot commented Apr 8, 2014

OUTPUT:
bc
3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment