macro_rules! syakutori {
(
$n:expr,
($l:ident, $r:ident),
|$i:ident| $addable:expr,
|$j:ident| $add:expr,
|$k:ident| $remove:expr,
$show:expr $(,)?
) => { ... };
}
Expand description
arg:
- n: length of array
- (l, r): ident of left-bound and right-bound
- addable: |index| expr: return is addable element
- add: |index| expr: add element
- remove: |index| expr: remove element
- show: call n times for l in 0..n, with rightmost r