Created
April 6, 2017 20:17
-
-
Save martincox/3a3d5e62329185710bfce10d21e65199 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -module(hofun). | |
| -compile(export_all). | |
| init() -> | |
| PrepareAlarm = fun(Room) -> | |
| io:format("Alarm set in ~s.~n",[Room]), | |
| fun() -> io:format("Alarm tripped in ~s! Call Batman!~n",[Room]) end | |
| end, | |
| AlarmReady = PrepareAlarm("bathroom"), | |
| AlarmReady(). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment