Document as variable in closure. Demo updated