classes.tuple: minor fixes in tuple-examples article
parent
7199339d89
commit
f0d22c7162
|
@ -215,12 +215,14 @@ ARTICLE: "tuple-examples" "Tuple examples"
|
||||||
{ $table
|
{ $table
|
||||||
{ "Reader" "Writer" "Setter" "Changer" }
|
{ "Reader" "Writer" "Setter" "Changer" }
|
||||||
{ { $snippet "name>>" } { $snippet "name<<" } { $snippet ">>name" } { $snippet "change-name" } }
|
{ { $snippet "name>>" } { $snippet "name<<" } { $snippet ">>name" } { $snippet "change-name" } }
|
||||||
|
{ { $snippet "position>>" } { $snippet "position<<" } { $snippet ">>position" } { $snippet "change-position" } }
|
||||||
{ { $snippet "salary>>" } { $snippet "salary<<" } { $snippet ">>salary" } { $snippet "change-salary" } }
|
{ { $snippet "salary>>" } { $snippet "salary<<" } { $snippet ">>salary" } { $snippet "change-salary" } }
|
||||||
{ { $snippet "position>>" } { $snippet "position<<" } { $snippet ">>position" } { $snippet "change-position" } }
|
|
||||||
}
|
}
|
||||||
"We can define a constructor which makes an empty employee:"
|
"We can define a constructor which makes an empty employee:"
|
||||||
{ $code ": <employee> ( -- employee )"
|
{ $code
|
||||||
" employee new ;" }
|
": <employee> ( -- employee )"
|
||||||
|
" employee new ;"
|
||||||
|
}
|
||||||
"Or we may wish the default constructor to always give employees a starting salary:"
|
"Or we may wish the default constructor to always give employees a starting salary:"
|
||||||
{ $code
|
{ $code
|
||||||
": <employee> ( -- employee )"
|
": <employee> ( -- employee )"
|
||||||
|
|
Loading…
Reference in New Issue