1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Haskell help

  1. Mar 31, 2008 #1
    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?
  2. jcsd
  3. Apr 15, 2008 #2
    Code (Text):
    foo :: a -> Int -> Int
    foo x = \x -> x+1
    This can be written more concisely as:

    Code (Text):
    foo = const (+1)
  4. Dec 29, 2011 #3
    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".
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?

Similar Discussions: Haskell help
  1. Fortran Help (Replies: 2)

  2. Understanding Haskell (Replies: 2)

  3. DE0 help (Replies: 7)