Main Question or Discussion Point

I want do the Haskell equivalent of SML-like "return a function"

fun foo x = fn x=>x+1

How do I do this in Haskell?

Related Programming and Computer Science News on Phys.org
Code:
foo :: a -> Int -> Int
foo x = \x -> x+1
This can be written more concisely as:

Code:
foo = const (+1)

Hi,People! I need to define in haskell a function which ignore all doublings . For example if i type a string "abaacccdee" in the end i get the string "abacde".