Factor
- IN: scratchpad 20 9 * 5.0 / 32 + .
- Booleans:t/f
- Sequences:{ { "one" 1 } { "two" 2 } { "three" 3 } { "four" 4 } } //注意空格
- Quotations(匿名函数):[ 42 + ]
- call
- 条件语句
- IN: scratchpad 10 0 > [ "pos" ] [ "neg" ] if .
- 或 IN: scratchpad 10 0 > "pos" "neg" ? .
- Stack Shuffling
- dup, drop, nip, swap, over, rot, pick
- Higher-Order Words with Combinators
- IN: scratchpad 44.50 [ 0.05 * ] [ 0.09975 * ] bi //见鬼
- bi*
- bi@
- tri tri* tri@
- IN: scratchpad 44.50 [ 0.05 * ] [ 0.09975 * ] bi //见鬼
- Vocabularies
- IN: scratchpad USE: present
- IN: scratchpad SYMBOL: tax-rate //What the Fuck!
- : greeting ( name -- greeting ) "Hello, " swap append ; //定义一个库函数?IN: examples.greeter
- : hello-world ( -- ) "world" greeting print ; //USE: examples.greeter
- Tuples
- TUPLE: cart-item name price quantity ; //?类型没有声明
- price>>(读)
- >>price(写)
- change-price
- "Seven Languages Book" 25.00 1 cart-item boa //By Order of Arguments
- TUPLE: cart-item name price quantity ; //?类型没有声明
- 标准库(字典):略
- IN: scratchpad "demos" run