Run Code

API

Code Wall

Misc

Feedback

Login

Theme

Privacy

Patreon
equiv
split xs = (take n xs, drop n xs) where n = div (length xs) 2 equiv xs ys length xs /= length ys = False length xs == 0 = True length xs == 1 = xs!!0 == ys!!0 otherwise = ((compare xs ys) == EQ)  (equiv a1 b1 && equiv a2 b2)  (equiv a1 b2 && equiv a2 b1) where (a1,a2) = split xs (b1,b2) = split ys main = do a < getLine b < getLine let n = (length a  1) let s = take n a let t = take n b putStrLn $ if equiv s t then "YES" else "NO"
run

edit

history

help
0
My "tying the knot"
adhoc braille dot rendering
divisibleBy a b
Reader
haskell
Lowest Common Ancestor in a Binary Tree
Calculate Integral of function
haskell_exam
project euler 9, haskell
Split into n distinct parts