Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

14 lines (10 sloc) 0.397 kb
{-# LANGUAGE DatatypeContexts #-}
data (Ord a) => OrdStack a = Bottom | Item a (OrdStack a)
deriving (Show)
isIncreasing :: (Ord a) => OrdStack a -> Bool
isIncreasing (Item a rest@(Item b _))
| a < b = isIncreasing rest
| otherwise = False
isIncreasing _ = True
push :: (Ord a) => a -> OrdStack a -> OrdStack a
push a s = Item a s
Jump to Line
Something went wrong with that request. Please try again.