First version of inline.

Review by @xeno-by or @denish
Why use a closure here?