I have a word that builds a quote that I want to name. However, when I download the code, I get Unable to apply a βcallβ to the estimated value of the runtime . If I use a walker and step by step code, it runs as expected. What can you name the constructed quote?
: ba>struct ( array class -- struct array ) [ <struct> swap ] keep struct-slots [ [ type>> to-type ] keep name>> setter-word 1quotation curry [ over ] dip curry call drop ] each ;
EDITED: It works
: ba>struct ( array class -- struct array ) [ <struct> swap ] keep struct-slots [ [ type>> to-type ] keep name>> setter-word 1quotation curry [ over ] dip curry call( -- x ) drop ] each ;
The problem is related to runtime, not knowing what stack effect the constructed quote has. In these cases, you must declare what the stack for the quote for the call looks like.
source share