rosetta stone - Palindrome Golf -


the goal: language. smallest function return whether string palindrome. here mine in python:

r=lambda s:all(a==b a,b in zip(s,reversed(s))) 

50 characters.

the accepted answer current smallest 1 - change smaller ones found. please specify language code in.

7 characters in j: not sure if best way, i'm new j :)

p=:-:|. 

explanation: |. reverses input. -: compares. operands implicit.

p 'radar' 1  p 'moose' 0 

Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -