def to-text-line x:_elem -> y:text [
local-scope
load-ingredients
y <- to-text x
]
def array-to-text-line x:address:array:_elem -> y:text [
local-scope
load-ingredients
y <- to-text *x
]
scenario to-text-line-early-warning-for-static-dispatch [
x:text <- to-text-line 34
]
scenario array-to-text-line-early-warning-for-static-dispatch [
n:address:array:number <- new number:type, 3
x:text <- array-to-text-line n
]
def to-text c:character -> y:text [
local-scope
load-ingredients
y <- new character:type, 1/capacity
*y <- put-index *y, 0, c
]
scenario character-to-text [
1:character <- copy 111/o
2:text <- to-text 1:character
3:array:character <- copy *2:text
memory-should-contain [
3:array:character <- [o]
]
]