Advertisement
asweigart

announce

Sep 29th, 2017
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. function hello()
  2. print('Hello there!')
  3. end
  4.  
  5. function goodbye()
  6. print('Goodbye!')
  7. end
  8.  
  9. function announce(func)
  10. print('About to call the function.')
  11. func()
  12. print('Function called.')
  13. end
  14.  
  15. announce(hello) -- no parentheses after hello
  16. announce(goodbye) -- no parentheses after goodbye
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement