The ArrayRef and Int type constraints are smart enough to know how to combine to make an ArrayRef[Int] type check which inlines the Int check inside a loop over the array. This inline code is evaled within a sub { ... } to create a single coderef which checks that a value is an arrayref, and all elements in the arrayref are integers.
That code can also be retrieved as a string for inlining into larger coderefs like constructors, etc.
In reply to Re^5: RFC: Inline::Blocks or inline as a keyword?
by tobyink
in thread RFC: Inline::Blocks or inline as a keyword?
by shmem
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |