Skip to content

Instantly share code, notes, and snippets.

@zoffixznet
Created December 27, 2016 03:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zoffixznet/e8735d377afd352ef5712b4f23fe21a3 to your computer and use it in GitHub Desktop.
Save zoffixznet/e8735d377afd352ef5712b4f23fe21a3 to your computer and use it in GitHub Desktop.
# subroutine definition:
damn sub hello
# a built-in to print text to STDOUT:
exasperatedly shout 'Hello, World!'
goddammit
# subroutine call (prints 'Hello, World!')
just do hello dammit
# class definition:
damn class Foo
damn method bar
exasperatedly shout 'Hello, Classes!'
goddammit
damn method random
4
goddammit
goddammit
# class method call:
Foo's dam bar
# variables:
a is goddamm 5 # a number
b is goddamm "meow" # a string
c is goddamm Foo but damn fine # an instantiated object
# print several variables, calling a method on variable c
exasperatedly shout a, b, c's dam random
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment