Run Code
|
Code Wall
|
Users
|
Misc
|
Feedback
|
About
|
Login
|
Theme
Is Preorder BST
--ghc 7.10 runTree :: [Int] -> Int -> Int -> [Int] runTree [] _ _ = [] runTree tree@(x : xs) low high | low <= x && x < high = right | otherwise = tree where left = runTree xs low x right = runTree left x high isBST tree = null $ runTree tree (-1000) 1000 main = print $ isBST [100,50,40,30,60,200,150,300]
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Quicksort in Haskell
project euler 8, haskell
Perfect numbers
first haskell program
Welcome
ReaderPractice
mySqrt
Exercise
Reader
znajdywacz trojkatow prostokatnych
Please log in to post a comment.