source: applications/trunk/UGPSummerSchool2008/src/Palindrome.rf @ 3828

Last change on this file since 3828 was 3828, checked in by orlov, 13 years ago
  • Palindrome.
File size: 364 bytes
Line 
1$module Palindrome;
2
3$use StdIO;
4$use Reverse;
5
6$func? IsPalindrome e.expr = ;
7IsPalindrome \{
8        /*empty*/ = ;
9        t1 e2 t1 = <IsPalindrome e2>;
10};
11
12$func? IsPalindrome2 e.expr = ;
13IsPalindrome2 e.expr =
14        <Reverse e.expr> : e.expr;
15
16$func Main = e;
17
18Main = {
19        <IsPalindrome2 <ReadLine>> = <PrintLn "п÷п╟п╩п╦п╫п╢я─п╬п╪ :)">;
20        <PrintLn "п²п╣ п©п╟п╩п╦п╫п╢я─п╬п╪ :(">;
21};
Note: See TracBrowser for help on using the repository browser.