]> gitweb.factorcode.org Git - factor.git/commitdiff
websites.factorcode: a couple more examples.
authorJohn Benediktsson <mrjbq7@gmail.com>
Thu, 27 Feb 2020 01:00:07 +0000 (17:00 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 27 Feb 2020 01:00:07 +0000 (17:00 -0800)
extra/websites/factorcode/examples.txt

index 0772e3ce00c1463160d3e61340b82d8916a2670f..fccad60e31e3711ec6ebb0ea6ccbe8e4929fa18b 100644 (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