Hi,
quoting A12:
> infix_postfix_meta_operator:<=> $x += 2;
> postfix_prefix_meta_operator:{'»'} @array »++
> prefix_postfix_meta_operator:{'«'} -« @magnitudes
> infix_circumfix_meta_operator:{'»','«'} @a »+« @b
so will the following work?
# Silly example
sub infix_circumfix_meta_operator:{'->', '<-'} (
Code &op,
$left, $right,
) {
op $left + 1, $right + 1;
}
say 2 ->+<- 3; # 7
say 2 ->*<- 3; # 12
--Ingo
--
Linux, the choice of a GNU | Time sharing - the use of many people by
generation on a dual AMD | the computer.
Athlon! |
Thread Next