websites.factorcode: a couple more examples.

master
John Benediktsson 2020-02-26 17:00:07 -08:00
parent 391e3734ee
commit b1a70d47a4
1 changed files with 16 additions and 0 deletions

View File

@ -62,3 +62,19 @@ USING: io kernel sequences ;
"Happy Birthday " write
2 = "dear NAME" "to You" ? print
] each
----
USING: dice formatting ;
ROLL: 2d8+4
"You do %s points of damage!" printf
----
USING: kernel rot13 ;
"Hello, world!" rot13
"Uryyb, jbeyq!" assert=
----
USING: ascii tools.test ;
{ "HELLO" } [ "HeLlO" >upper ] unit-test
{ "Hello" } [ "HeLlO" >title ] unit-test
{ "hello" } [ "HeLlO" >lower ] unit-test