Created
April 3, 2013 08:30
-
-
Save andyman3000/5299459 to your computer and use it in GitHub Desktop.
Module pattern for CoffeeScript
This file contains 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
app = ((app) -> | |
priv = -> | |
console.log "private func" | |
app.pub = -> | |
console.log "public func" | |
priv() | |
app | |
)((if typeof app is "undefined" then {} else app)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment