diff options
author | Guillermo Ramos | 2014-07-02 22:15:26 +0200 |
---|---|---|
committer | Guillermo Ramos | 2014-07-02 22:15:26 +0200 |
commit | 4022f2401399c0911103eaf7988fde4372b7f727 (patch) | |
tree | cfe2aa02063aea02f5e5790778d4e4fd2f6fdeed /factor/examples/strings | |
parent | f3c354d396a38033dac28ece6f6220e75cef5aec (diff) | |
download | 7l-4022f2401399c0911103eaf7988fde4372b7f727.tar.gz |
[Factor] Día 2 (sin terminar)
Diffstat (limited to 'factor/examples/strings')
-rw-r--r-- | factor/examples/strings/strig-tests.factor | 5 | ||||
-rw-r--r-- | factor/examples/strings/strings.factor | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/factor/examples/strings/strig-tests.factor b/factor/examples/strings/strig-tests.factor new file mode 100644 index 0000000..714c4ca --- /dev/null +++ b/factor/examples/strings/strig-tests.factor @@ -0,0 +1,5 @@ +USING: examples.strings tools.test ; +IN: examples.strings.tests + +{ f } [ "hola" palindrome ] unit-test ; +{ t } [ "blrlb" palindrome ] unit-test ; diff --git a/factor/examples/strings/strings.factor b/factor/examples/strings/strings.factor new file mode 100644 index 0000000..cf9bd6d --- /dev/null +++ b/factor/examples/strings/strings.factor @@ -0,0 +1,5 @@ +USING: kernel sequences ; +IN: examples.strings + +: palindrome ( s -- bool ) + dup reverse equal? ; |