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
Bruteforce IEEE Floating Point Numbers
Search
Sierpinski Triangle as lazy list
appending and prepending list
Square root
Anonymous recursion. Why doesnt compile?
haskell_exam
Haskell remove item by index
(Int,Int) -> Bool plot
Calculate Integral of function