09-inheritok
Structure
fn · h1Greeter
fn · h2hello
who
bind
`msg` = Hello, `who`!return
`msg`fn · h1Loud
fn · h2hello
who
bind
`msg` = HELLO, `who`!return
`msg`fn · h1main
bind
`g` = > Greeterbind
`m` = > `g`.hello who=worldcall
> print text=`m`bind
`l` = > Loudbind
`m2` = > `l`.hello who=worldcall
> print text=`m2`Execution
Hello, world!
HELLO, world!
Source
---
title: Object inheritance
description: "# Child = > Parent; methods walk the base chain"
---
# Greeter
## hello
+ `who`
**`msg` = "Hello, `who`!"**
*`msg`*
# Loud = > Greeter
## hello
+ `who`
**`msg` = "HELLO, `who`!"**
*`msg`*
# main
**`g` = > Greeter**
**`m` = > `g`.hello who="world"**
> print text=`m`
**`l` = > Loud**
**`m2` = > `l`.hello who="world"**
> print text=`m2`