Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
3
Task/Palindrome-detection/M4/palindrome-detection-1.m4
Normal file
3
Task/Palindrome-detection/M4/palindrome-detection-1.m4
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
define(`palindrorev',`ifelse(`$1',invert(`$1'),`yes',`no')')dnl
|
||||
palindrorev(`ingirumimusnocteetconsumimurigni')
|
||||
palindrorev(`this is not palindrome')
|
||||
7
Task/Palindrome-detection/M4/palindrome-detection-2.m4
Normal file
7
Task/Palindrome-detection/M4/palindrome-detection-2.m4
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
define(`striptwo',`substr(`$1',1,eval(len(`$1')-2))')dnl
|
||||
define(`cmplast',`ifelse(`striptwo(`$1')',,`yes',dnl
|
||||
substr(`$1',0,1),substr(`$1',eval(len(`$1')-1),1),`yes',`no')')dnl
|
||||
define(`palindro',`dnl
|
||||
ifelse(eval(len(`$1')<1),1,`yes',cmplast(`$1'),`yes',`palindro(striptwo(`$1'))',`no')')dnl
|
||||
palindro(`ingirumimusnocteetconsumimurigni')
|
||||
palindro(`this is not palindrome')
|
||||
Loading…
Add table
Add a link
Reference in a new issue