Jump to content

DR SCHEME

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1
taha

taha

    Newbie

  • Members
  • Pip
  • 1 posts
Write a predicate that tests whether a given string is palindromic or not. A string is palindromic if it reads the same in both directions. Accordingly, application of this
predicate should give the following results.
(palindromic? “madam”) Þ #t
(palindromic? “Madam”) Þ #t
(palindromic? “”) Þ #t
(palindromic? “chic”) Þ #f
(palindromic? “küçük”) Þ #t

HOW TO DEFİNE THIS FUNCTION IN THE SCHEME

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
Well, you'll need it to ignore case, so first I would change the string to upper case.
You need to be able to compare the string to it's reverse, so a reversestring function might be nice.

If you show us the code you have so far, we may be able to help further.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog