diff options
author | Adrian Lopez <adrianlzt@gmail.com> | 2013-12-16 23:33:41 +0100 |
---|---|---|
committer | Adrian Lopez <adrianlzt@gmail.com> | 2013-12-16 23:33:41 +0100 |
commit | d297853c06f4651da4c83f536d601140ae4d571d (patch) | |
tree | 5e88d9288c9372630be78e38fec85774cd150c5a /julia.html.markdown | |
parent | 6f194db75559eef10ee84e691a5bfdc3914e2ad5 (diff) |
Is a little confusing naming the variable as the abstract. At first I was thinking that cat::Lion means that you are waiting for a Lion type of super type Cat
Diffstat (limited to 'julia.html.markdown')
-rw-r--r-- | julia.html.markdown | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/julia.html.markdown b/julia.html.markdown index d1e17a26..4e89bea5 100644 --- a/julia.html.markdown +++ b/julia.html.markdown @@ -575,15 +575,15 @@ end # For a non-constructor example, let's make a function meow: # Definitions for Lion, Panther, Tiger -function meow(cat::Lion) - cat.roar # access type properties using dot notation +function meow(animal::Lion) + animal.roar # access type properties using dot notation end -function meow(cat::Panther) +function meow(animal::Panther) "grrr" end -function meow(cat::Tiger) +function meow(animal::Tiger) "rawwwr" end |