Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
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
Traversable
Exercise
project euler 10, haskell
Eerste programma
FizzBuzzkell
My "tying the knot"
project euler 3, haskell
ad-hoc braille dot rendering
Haskell Tree example
Perfect numbers