Skip to content

Commit

Permalink
Revert "interpolate: number stack arguments from top of stack."
Browse files Browse the repository at this point in the history
This reverts commit 162f75a.
  • Loading branch information
mrjbq7 committed Apr 20, 2015
1 parent 162f75a commit 5726f4e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion basis/interpolate/interpolate-docs.factor
Expand Up @@ -7,7 +7,7 @@ HELP: interpolate
{ $examples
{ $example
"USING: interpolate ;"
"\"Bob\" \"Alice\" \"Hi ${1}, it's ${0}.\" interpolate"
"\"Bob\" \"Alice\" \"Hi ${0}, it's ${1}.\" interpolate"
"Hi Bob, it's Alice."
}
{ $example
Expand Down
6 changes: 3 additions & 3 deletions basis/interpolate/interpolate-tests.factor
Expand Up @@ -3,9 +3,9 @@
USING: interpolate io.streams.string namespaces tools.test locals ;
IN: interpolate.tests

{ "A B" } [ "A" "B" "${1} ${0}" interpolate>string ] unit-test
{ "B A" } [ "A" "B" "${0} ${1}" interpolate>string ] unit-test
{ "C A" } [ "A" "B" "C" "${0} ${2}" interpolate>string ] unit-test
{ "A B" } [ "A" "B" "${0} ${1}" interpolate>string ] unit-test
{ "B A" } [ "A" "B" "${1} ${0}" interpolate>string ] unit-test
{ "C A" } [ "A" "B" "C" "${2} ${0}" interpolate>string ] unit-test

{ "Hello, Jane." } [
"Jane" "name" set
Expand Down
2 changes: 1 addition & 1 deletion basis/interpolate/interpolate.factor
Expand Up @@ -44,7 +44,7 @@ TUPLE: stack-var n ;
name>> quot call '[ _ @ present write ]
] [
dup stack-var? [
n>> 1 + '[ _ npick present write ]
n>> vars swap - 1 + '[ _ npick present write ]
] [
'[ _ write ]
] if
Expand Down

0 comments on commit 5726f4e

Please sign in to comment.