Memoize |
BasicWerk
EC Support
Technique
Facebook
|
20140719091200_factor_let_and_quotation |
|
factor_let_and_quotation
http://basicwerk.com/memoize/20140717155341_factor_let_and_execute.html
前記事の続き。
[| binding | ... ] はクォーテーション化されるが、[let ... ] は単なるブロックである。
だからクォーテーションを受け取るような Word には [let ... ] は使えない。
例:
! each のコンテクストでは quotation を期待しているのでこれは error
IN: scratchpad auto-use { 1 2 3 } [let number>string :> n n print ] each
Generic word >base does not define a method for the array class.
Dispatching on object: { 1 2 3 }
Type :help for debugging help.
! 上記のコンテクストならこう
IN: scratchpad auto-use { 1 2 3 } [| n | n number>string print ] each
1
2
3
|
| © Shin Nakamura/BasicWerk 2014 |