[ create a new paste ] login | about

Link: http://codepad.org/4ZT5ZCwH    [ raw code | output | fork ]

Haskell, pasted on Mar 17:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
-- | maximumList replace each element in a list by its maximum so far
-- 
-- Examples:
--
-- >>> maximumList [1..4]
-- [1,2,3,4]
--
-- >>> maximumList [10,9..7]
-- [10,10,10,10]
--
-- prop> and . (zipWith (<=) <*> tail) . maximumList

-- maximumList :: Find a general signature
maximumList = undefined


Output:
1
2
Error occurred
ERROR - Undefined variable "main"


Create a new paste based on this one


Comments: