[Haskell-cafe] How can you effectively manually determine the type?

2009-02-27 Thread Anonymous Anonymous
Hello, I'm new at haskell and I have the following question: let's say I type the following: function = foldr until Now my first question is what is the type of this function? Well let's see what the type of until and foldr is: until :: (a -> Bool) -> (a -> a) -> a -> a foldr :: (a -> b -> b)

[Haskell-cafe] Assignment of grayCode

2009-03-02 Thread Anonymous Anonymous
Hello, I'm working on a project for my university. But I do not understand the assignment. It asks me to write a function that does the following: grayCode :: Int -> ([Char] -> Int, Int -> [Char]) well in my opinion this assignment tells me to write some function that gets one input (an integer)

[Haskell-cafe] Function to cast types

2009-03-22 Thread Anonymous Anonymous
Hello, I'm new to haskell, I'm wondering how can you write a function that will do the following: fromIntToString :: Int -> String this is a cast function to cast an Int to a String. I know such function exist, however let's assume it didn't exist. How would I write such function? Cause I have n

Re: [Haskell-cafe] Function to cast types

2009-03-22 Thread Anonymous Anonymous
Thank you all for your answers, you've all been a great help to me! ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Function to cast types

2009-03-22 Thread Anonymous Anonymous
Hello, an answer from me, this is NOT the homework assignment. For my own homework assignment, I had to create custom data types and convert a string containing my datatype into my datatype. I will not expose my datatype, but it is something with logical operators. My approach would be using "ope

[Haskell-cafe] A small display problem using Helium

2009-03-23 Thread Anonymous Anonymous
Hello, I've written something simple: main:: IO () main= do lijn <- getLine putStrLn lijn Now if I import it in Helium it will do the following: Test> main test -- (here I'm typing test) test it will be displayed two times,