Paste: stack effect problem

Author: tizoc
Mode: factor
Date: Wed, 15 Apr 2009 02:03:31
Plain Text |
: add-timestamp ( string timestamp -- )
    timestamp>hms "[" prepend "] " append prepend ;

While compiling add-timestamp: 

In word: log-message
Stack effects of the word add-timestamp do not match.
Inferred: (( object object -- object ))
Declared: (( string timestamp -- ))

Annotation: random stroll

Author: randy
Mode: factor
Date: Wed, 15 Apr 2009 19:23:13
Plain Text |
yep, it should return a string at the end.

prepend takes two values, and returns one (the combined strings) so the word should have an output stack effect of one string.

New Annotation